The question being why a taxi or minicab needs a license and why a city council gets to administer it ?
There are basically 3 reasons for this:
1) Taxi's can accept rides from random people on the street. Someone can stand on the street and flag a taxi down to accept to get a ride, and a taxi can accept that ride and charge for it. This is versus 'booking' services, such as town cars, limousine hire and so on. In this latter case, prior to the internet, the customer would have to contact the company before hand (telephone, or turn up in person to a booking office (and/or have one of their staff do so)) to book. Therefore the transport company would have more details about who's hiring the service, pick up address, pre-payment of the service for the expected duration, possibly even credit car or bank account details if that's how it's paid for. Therefore a taxi was a much more risky proposition, safety-wise, financially for the driver, and tax/money laundering-wise. Since a taxi has no record of who is picked up, where they are picked up, the danger to passengers is greater, therefore a taxi driver needs stronger vetting/background checks for their license. Also, the driver is more at risk, both physically for the same reasons as passengers, but also because a taxi fare is paid on completion of the ride, rather than an up-front daily booking fee, which could put the passenger in more danger due to fare disputes, after the service is already provided, so the passenger can just do a runner if they disagree (or were intending not to pay at all), and can make for more aggressive drivers due to this possibility of losing payment for a service they have provided. And, since the government have this no knowledge of rides situation, it is easier to take cash and not report it for tax purposes, or to claim more money is going through than it is for money laundering, and so on. All leading to higher taxi driver vetting requirements, and stricter monitoring and regulation of taxi services
2) Taxi companies/operators want to restrict competition so that they can make more money. Since the government is going to be more restrictive of licenses anyway, due to issues noted above, then they can use it to their advantage by putting their finger into the pie and egging on the restrictions, to their advantage with respect to enforcing a monopoly or near-monopoly-like circumstances. This enables them to better control the cost of fares, and to make money for buying and selling the taxi medallions/plates. It serves to keep competition out, and they can gain regulatory capture, that is, where the regulators/licensors work for the benefit of the people they are regulating, the taxis, rather than for the benefit of the customers, the public, which was the purpose of the creation of any such bodies.
3) The government can use it to generate revenue, by selling or even auctioning the medallions/plates. Where I am, in the 90's a new issue of taxi plate (often only done a half dozen at a time and only a couple times a year) would net the government between $200k and $400k per plate. The government also charge large fees for actual taxi driver licences (as opposed to the taxicab operating/owing plate/medallion), annual fees on taxis, and so on. This is an additional benefit to the government on top of the other reasons, passenger safety, making it more difficult to dodge taxes and/or use the service to launder money, etc.
Now along comes ride-sharing services. Technically, under the law (depending on how different jurisdictions define various things that is), ride-sharing services are more akin to the town car, limousine hire-type services, in that they can only take fares who pre-book with the company. The person who takes a lyft, uber, or what have you, has to book with the operator first, providing their personal details, payment methods, and pickup address up-front. Of course, and lot of this is transparent to the user now though, because they create an account with the service, and don't even often have to type the pickup address as GPS can provide it automatically, therefore each time they 'book' their ride-share, in the end from a user perspective its not a whole lot different than flagging down a taxi in the street or going to a taxi-rank, as it is all so automated. Therefore, to the chagrin of regulated taxi services, they - up to now at least - have operated under town car service rules (i.e. less restrictive except for that they are not allowed to be flagged down in the street) while being able to behave much closer - and provide real competition to - taxi cab services. Of course this is changing, as some jurisdictions are starting to regulate them as closer to taxi cab services than town car services.