I believe that the Egyptians were so obsessed with immortality because they appreciated their lifestyle, especially if they came from a royal family. Having immense wealth, not having to do physical labor, basically just breathing and knowing that you have absolutely no worries or frustration or problems is enough to want to live forever.
The whole mummification process was to preserve the body for the return of the soul, it was a form of protection i would guess. The egyptians had great belief in magic spells, their gods and the alignment of the stars to bring them back and live forever. All the gold and money and precious belongings always belonged with the king and thats why they were buried with their wealth, so they would know where to come back to and know that their riches would be there for when they came back.
Anther theory maybe that they just feared death so much, the regret of losing everything they have was to unbeatable. So instead of losing their empire, their kingdom they sought for immortality. Egyptians were the first innovators in seeking a permanent life, everyone else afterwards didn't have such a structured process into actually attaining immortally.
The pyramids are a testimony of the dedication that the egyptians had . I don't think that they would spent so much effort into constructing these massive tombs if they didn't think that they were gaining something great of it