Castles did alot to contribute to advancement of society. Most castles were complete communities inside, with market places and everything. The were designed for war, helping to revolutionize the ways war back then were fought. They created jobs, because building and maintaining them was so exhausting. A example of this was getting water to the castle, which involved channels and canals. They also, helped to establish hierarchies within the castle walls. They provided safety and security to people inside. These are just some examples I am sure there are many more, hope this helps.