If aliens from space can die and mourn their dead then they likely invented gods to worship. Because they missed their loved ones, and did not wish to die themselves, they invented an afterlife.