This law was passed in 1279, as the Houses of Parliament were meant to be a civilized, non-violent place.
There was a court case involving a woman who got a heel of one of her shoes caught in a sidewalk grating, fell, and injured herself. The city subsequently passed this law in order to protect itself from future litigation.
Sec. 15-37. Recreational activities. No person in a park shall: (a) Bathing and swimming. (1) Designated areas. Swim, bathe, or wade in any waters or waterways in or adjacent to any park, except in such waters and at such places as are provided therefor, and in compliance with such regulations as are herein set forth…