I'm convinced that pyramids were built more as bunkers than as tombs. Sure they were used as such, but consider their features and utility.
High-ground gives archers range, and long line of sight. Horses couldn't traverse the steep surfaces, and foot solders would have to fight uphill. Traps and secret passages make navigation a daunting task. Stone construction prevents arson and render any sort of siege weapons useless. Food and novelties ensure a long stay is possible.
Rulers of these ancient cultures often had invading armies and their own subjects to to hide from. Pyramids seem like the most practical solution to this problem.
No, you're about correct. As far as I'm aware, siege weaponry wasn't prevalent in this time period. Walled cities were in some areas, but armies generally fought outside the walls. Chariots were big at this time.
I don't have any sources in front of me to quote as I just got off shift, but if someone has anything to add, I'd gladly check beck into this conversation when I wake up.