In ancient Egypt, religion palmed the most important role in the government administration, rulers of the pharos and the society. God's were given the utmost veneration and many temples and pyramids were built to honour the gods.
The religions brought the Egyptian society a degree of order and stability. It acted as an informal set of laws and a code of conduct that ruled over bother commoners and the rolling upper class as well.
Moreover, the religion acted acted as a force that unite the people and families. This was mainly seen during religious festival seasons.