The freedom given to armed forces to march through a city has its origins in ancient Rome. Troops were forced to remain outside city gates and if trust was established with the city, they were then given the freedom to march through it.
This ceremonial honour is now bestowed by a city council and demonstrates the respect and the trust citizens have in the military to protect their democratic institutions. It is typically demonstrated through regular parades, with the mayor having the honour of inspecting the troops. These are formally agreed to through a signed charter which also provides for two uniformed officers to attend the mayor on important official occasions, e.g. ANZAC Day.
The right to march is exercised through organised charter parades and is agreed to with each of the armed forces, army, navy and airforce.