> It's only for war or to consolidate power in the hands of the ruling class
Consider Egyptian and Mesopotamian irrigation and flood management, Persian and Roman roads, Chinese canals...
What about them? These technologies already existed, the only thing that changed is that economies of scale enabled by the centralized power. Smaller tribes and villages could have gone by implementing more localized solutions.
Roman aqueducts, modern railroads, the moon landing, the LOTR films, CERN, or Wikipedia...
This seems like an open-and-shut case of failing to look for disconfirming evidence.