The pyramids were mostly created as a protection for the body in a tomb. The shape provided protection because they were very steep, and the pyramid itself was filled with a maze of pathways and traps to protect the body and tomb.
So the Pharaoh could make a big entrance.
Pharaoh tombs.
The purpose is to make clean energy from a clean source (wind).
wives' pyramids
Actually they did not build the pyramids to impress people. The purpose of the pyramids was to protect the bodies (and funeral goods) of the Pharaohs and other important people who were buried inside them. The ancient Egyptians had rather extreme funeral customs. The fact that pyramids are impressive is purely coincidental to their actual function.
Most scholars believe that pyramids were built as resurrection machines.
For the Pharaoh tombs
To protect their bodies.
The pyramids that you are talking about were built to hold the remains of dead Egyptian (and other) pharoahs.
Egyptian pyramids were basically large elaborate tombs/memorials. Pharaohs commissioned the pyramids to be built so they could be buried inside.
In order to make a cube out of pyramids, one would need a minimum of 6 pyramids.
They were burial places for important emperors.