Depending on the context and who built the wall, it was usually to keep the residents of the city inside the city, OR to keep people outside the city outside / stop the influence of people outside the city from entering the city.
This period is often referred to as the Age of Kings. This the era where powerful dictators lead a number of nations. This occurred during the 17th and 18th centuries. Also many monarchs in the Europe ruled their respective countries with almost dictatorial powers.<span />
Booker t Washington was a big believer that education would be the source of social mobility and a means to acquire power in American society. He believed that if a large amount of the black population could become educated (and keep in mind a majority of the black population was illiterate at the time) they would rise to power in society and become respected as equals in American society. This was in contrast to his contemporaries who believed that political demonstrations, protests and other ways of "fighting" for social and political power were more effective. Booker T Washington was also a career educator and founded the Tuskegee Institute which was one of the first historically black colleges, and is still educating students to this day.
to create a permanent settlement to allow for equal access to trade
In 1668 AD newton invented telescope