All of Egyptian life was affected by the gods.
If things were to go well, the gods must be satisfied with your actions on Earth.
If you did not do enough for the gods, then disaster would occur.
At the end of life the gods would decide whether you went to heaven or not.