The show began in 1215 when King John created a Royal Charter that allowed the city to choose its own mayor every year, instead of having a sheriff appointed by the king.
The king insisted that each newly-elected mayor should come to Westminster and swear loyalty to the crown, and the mayor has been making that journey for over 800 years.