They were constructed by Suleiman the Magnificent, the Ottoman Turkish sultan, who never visited Jerusalem but (according to tradition) had a dream that he would be devoured by lions unless he rebuilt the walls of the city.
Suleiman the Magnificent had a nightmare about being eaten by lions, so he had the city walls rebuilt.