The purpose of law

What is the purpose of law? I find myself having this little internal conversation every time I run the red light at Shillito Park and W Reynolds Road. The purpose of law, as I understand it, is to protect the freedom of citizens. Or, as John Adams put it, to secure the maximum amount of happiness for the maximum number of people. That is, certain freedoms (like the freedom to drive anywhere I want) must be curtailed in order to protect certain other freedoms (such as the freedom not to be squished like a frog in an intersection). And so, as I wait for 4 minutes at a red light while no traffic flows in the other direction, I have to wonder what freedom is being protected in exchange for my impatience and annoyance at waiting, apparently, for nothing. I have no answer to this. So I’m often likely to run the light, when it is abundantly clear to me that there is no harm done by my doing so. I expect that one of these days it will get me in trouble.