Were they simply tombs for pharaohs, or astronomical markers to aid the quantifying of time; were they built to concentrate a natural energy source, or were they not built by humans at all, a sign that an alien intelligence visited the earth many thousands of years ago?
No one is sure what they did.
The Egyptians left clear instructions for why they did what they did.