It might go so far that perhaps the reason the area never saw major military campaigns is because of the defensibility of it's castles?
Stone Age people painted the animals they were going to hunt on rocks so that the pictures would entrap the animals' spirit and they would be easier to catch. This method of ensuring a good hunt was not effective so why did they do so many paintings?
Military technology has to prove itself in this life, not the next. That's a more stringent test.
Without the wall, raiding bands of any size could just slip through and cause havoc. Only large and well-organized forces had siege equipment to break through wherever they wanted. Similarly, traffic and migration of peoples could be controlled and tolls and customs could be enforced. It also acted as an infrastructure for fast transmission of messages. In those ways, like the Roman Limes and the European castle networks, it was mostly an infrastructure for peaceful times.
But even in war, it was preferred to bypass it or to capture a gateway fortress, otherwise these forces could cause enormous problems for the attackers. For example, only allying with the Ming garrison at Liaoning made it possible for the Manchus to crush the short-lived Shun dynasty and establish the Qing dynasty.
Getting across animals and heavy equipment is not easy.
Cause enough delay to send some more soldiers to deter them some more?
Pyramids were built for the after-life. Not as a way to extend their life on Earth. Nobody could verify if it actually worked, so it's mostly a question of faith.
> Stone Age people painted the animals they were going to hunt on rocks so that the pictures would entrap the animals' spirit
That's just speculation from historians. It may be that they are right, but there are also other theories. One other theory could be that it is a way of giving thanks to the animals, and a way to honor their loss. Personally I don't think there is a single reason why they painted animals. People have always had different motivations
You made the following statements:
1. Pyramids were built so kings could live forever
2. The Egyptians saw that this did not work, but continued to build pyramids.
The first statement is not true. The pyramids were built for the after-life. This invalidates the premise for your second statement, as the Egyptians could not verify that it worked in the after-life (or that there even is an after-life).
Now that you see my reply in a different context, your castle analogy is also not relevant.
This is pure speculation. The track record of speculations by archaeologists isn't very good.
Probably the silliest speculation ever was when two gourds connected by a string were hypothesized to be an ancient telephone.
I think most castles were built mainly as status symbols, and not the result of a regional or national defense strategy. Castles are imposing buildings in places that dominate the landscape, built by local leaders to project their power and influence. You see a few castles being built in the US in non-feudal times for similar reasons.
https://en.wikipedia.org/wiki/List_of_castles_in_the_United_...
Afterwards the defensive purpose of these structures started to gave way to the more opulent side. Some manor houses featured defensive structures mainly for show, although they served the same purpose.
I said "project", not "protect". Meaning, one is a kin to peacocking, while the other is literally building moats and draw bridges to keep the enemy at bay.
To stop that from happening, one has to capture the castle or be friendly with the garrison. This creates problems for anyone passing through, be they farmers, merchants, unfriendly neighbors of the noble, or an army passing through.
Peacocking might have happened, but castles would be a useful form of peacocking. Be as that may, they were still mostly uncomfy money drains, barely earning back their running costs via tolls, and usually funded by major nobles who then sent their underlings to actually man the place. If at all possible, one would rather build two castle in useful locations than a single redundant one.
You could of course argue the newer structures weren't castles at all of course, even if they were called that.
I think you are mixing up more than 1000 years of architectural history in a few lines.
Medieval castles were very much defensive installations, which is clear from their a) layout, b) locations, c) the fact that medieval history of warfare is chock-full of castle sieges, while pitched battles like Crécy or Grunwald were spectacular, but rare.
Fancy 19th century castles (re-)built in opulent style were mostly conspicuous consumption, as you say. But by that time, nobility preferred chateaus/palaces anyway. Much more comfortable to live in.
Status castles have windows in the walls, and thin walls.