So its a good thing for people to get killed, because it spares them time on this horrible earth and takes them to the next life? Scary line of thought that is.
Allaah has appointed death for us all at a certain time period, we can't avoid that by an instant.
And it is not [possible] for one to die except by permission of Allah at a decree determined. And whoever desires the reward of this world - We will give him thereof; and whoever desires the reward of the Hereafter - We will give him thereof. And we will reward the grateful.
(Qur'an 3:145)
People die in different ways, some people may face a calamity before their death. This may be a form of forgiveness for them, since the trials we face in this life can be either for us or against us. This depends on the person, if they remain patient and place their trust in Allaah - they gain Allaah's pleasure, because the person is aware that Allaah is the Wise, All Knowing.
We as simple humans are limited to the present only, therefore we place our trust in Allaah, knowing the wisdom behind the situations we face in life, and the ease which Allaah brings through it.
So, verily, with every difficulty, there is relief:
Verily, with every difficulty there is relief.
[Qur'an 94: 5-6]
Therefore when someone dies in a disaster, then it may have been a punishment from Allaah. Or it may have been a wake up call for other people throughout the world to realise how weak and helpless they are. And that this disaster isn't just by nature, but rather by the wisdom of the All Knowing, All Wise.
So even if muslims are punished for their sins, it may be that this is an expiation for their sins in regard to the afterlife. Or it may also be a wake up call for others who have never really thought about death as often.
For instance, the trials we as muslims are facing in this world are huge. And the Messenger of Allaah, Muhammad (peace be upon him) spoke the truth when he said (translation of the meaning):
“This community of mine is a community blessed with mercy. It is not punished in the Hereafter. Instead, it is punished in this world with strife, instability, and bloodshed.” [Musnad Ahmad, Sunan Abî Dâwûd, and Mustadrak al-Hâkim] It is an authentic hadîth. It indicates that Allah has shown mercy on the Islamic community and that its punishment will be in this world instead of the Hereafter.
It may be that those who disbelieve don't face as much trials in this life, yet their punishment may be in the hereafter for their wrongdoings and ungratefulness.
And for the believer, no matter how much hardships or moments of ease he /she faces in life, it is always a form of goodness for them;
The Messenger of Allaah, Muhammad (peace be upon him) said:
How wonderful is the situation of the believer, for all his affairs are good. If something good happens to him, he gives thanks for it and that is good for him; if something bad happens to him, he bears it with patience, and that is good for him. This does not apply to anyone but the believer.” Narrated by Muslim (2999).
And he also (peace be upon him) said (translation of the meaning):
No fatigue, nor disease, nor anxiety, nor sadness, nor hurt, nor distress befalls a Muslim, even if it were the prick he receives from a thorn, but that Allah expiates some of his sins for that” (Al-Bukhari and Muslim).
And Allaah is the source of strength.
Peace.