Even in 1215 London was an independent sort of city: rich, international and and hard to govern. It was the largest city north of the Alps, with nearly 15,000 residents*. Its merchants were organising a mediæval commune to protect themselves against pillaging barons and a taxing King, and its diverse trading population had strong connections to Europe and Scandinavia.
Meanwhile, bad King John was in trouble. He was retreating in France, running out of money and losing control of his Barons. Discontent was turning into open revolt and the King was very short of allies.
In 1215 the King was persuaded to issue a Royal Charter that allowed the City of London to elect its own Mayor. We presume that he gave his blessing to the commune in order to keep the City on his side**, but there was an important condition. Every year the newly elected Mayor must leave the safety of the City, travel upriver to the small town of Westminster and swear loyalty to the Crown. The Lord Mayor has now made that journey for 800 years, despite plagues and fires and countless wars, and pledged his (and her) loyalty to 34 kings and queens of England.
The Mayor was a new power equal to any of John's unruly Barons, and only two months later he would add his signature to the Magna Carta. He was no doubt responsible for the wording of part 13:
13. The city of London shall enjoy all its ancient liberties and free customs, both by land and by water. We also will and grant that all other cities, boroughs, towns, and ports shall enjoy all their liberties and free customs.
For the next few hundred years, Lord Mayor of London was by far the grandest position to which a commoner could aspire, and the Mayor's journey was the celebrity spectacle of its day. Over the centuries it grew so splendid and so popular that by the 16th century it was known everywhere as the Lord Mayor's Show. It features in the plays of Shakespeare, the diaries of Pepys and the adventures of James Bond and of course in the pantomime story of Dick Whittington, who really was the Mayor of London three times. In the 20th century the Lord Mayor's Show was the first outside event ever to be broadcast live and it still attracts a TV audience of millions.
The modern Lord Mayor's procession is a direct descendant of that first journey to Westminster. The route and date have changed over the years but the pageantry of Hogarth and Canaletto can still be seen in its lively mixture of London's past, present and future. The state coach is 350 years old, and the pikemen who guard it are almost as old as the Show. Today you will see the City's businesses, Livery Companies, charities, Her Majesty's Forces, the City Police and Londoners from all walks of life come together to enjoy a splendid celebration of the City's ancient power and prosperity, just as they did in the middle ages.
* Not a very big city by modern standards, but in fact that's twice the resident population of the City of London in 2011.
** This didn't entirely work. Less than a year later, after both sides had ignored the terms of the Magna Carta, the struggle between John and his northern barons become a civil war. Robert Fitzwalter, leader of the rebellious barons, based himself in London and after a series of blunders was forced to seek help from France. It is said that Londoners lined the streets to welcome Prince Louis and his troops.