The purpose of the medallion is to create a guild. In practice, the coexistence of ride-sharing defeats that purpose, subjecting all drivers to the risk of unlivable wages, and penalizing guild members with dues.
but how? the market would decide how much a taxi driver earns based on the simple law of supply and demand. Unlivable wage for one might be a very livable wage for another one.
The consumers would massively benefit from increased competition.
Maybe you want locals with families to have the opportunity to drive. So you control the supply until they can afford local rents and still have time to spend with their kids.
Of course, cities often turned it into extortion, but they don't have to do that.
Overtime the system was intended to do various things like hold drivers accountable which it very much did, as well as various things it failed at.