Why were the pyramids built? What purpose did they serve? Are current hypotheses regarding their construction incorrect? Why or why not?

Why were the pyramids built? What purpose did they serve? Are current hypotheses regarding their construction incorrect? Why or why not?