That looks good on paper but rarely works out in real life. In order for it to work everyone must be honest and a monopoly does not exist. We are a very far way from the idealized small shopkeeper model of Adam Smith. Here are some reasons for government regulation of taxis:
1) So customers do not get ripped off. Prices are set or at least clearly advertised.
2) So customers are not raped or murdered. If you hire a ride from Joe Random taxi driver without licensing and a background check you have no assurance about the driver. In fact the lack of assurance could kill the industry as people look for other options.
3) Insurance. If there is an accident are passengers, occupants of other vehicles, or pedestrian need to be covered if the taxi driver is at fault.
4) Mechanical safety of the vehicle. Has the Uber and Lyft cars been checked over for dangerous faults or wear and tear? Are the tires good? Etc.
5) ENSURING competition. If one company gets too big you restrict their licenses while issuing more for their competitors. Sometimes the best way to approach the ideal of a free market is through careful regulation. Free market != unregulated market.
Those are the ones on of the top of my head. The world is much more complex that Economics 101 or a fictional account of how one writer thinks the world should work. It is even more complex and dynamic that even people with Phds in economics can imagine, IMO. Instead of simplistic solutions we need to look for solutions that actually work.