If only there was a system where you could call a cab exactly to where you are, monitor its position while it arrives in real time, and one that would drop you off exactly where you wanted to go. A system where you could comment on the quality of the driver after each ride so that the bad ones are permanently kicked off.
Wait, there is. It's called Uber.
In this case self-regulation and competition work better than government regulations. Uber has self-interest in making sure they work well or else people will move to a better system.
Having government erect and then enforce the laws is a costly externality of the taxi system - police officers are paid with your money too.
A more commonly abused rule is that cabbies cannot refuse a destination but many will do so if it's in the outer boroughs (imagine Manhattan to Queens or Brooklyn) as they're not guaranteed a fare on the return. At night many will ask you where you're going before you get in to weed this out specifically (illegal). Again, anybody who's lived in the city long enough knows to just ignore the driver and get inside before instructing him where you're going.
I've heard stories that there are undercover folks working for the city that test out the cabbies and fine them if they refuse a legit fare.