Most of the time, cabs just drive around waiting for a fare. This is because cabs are often hailed when they are seen, but even if a cab is summoned by a phone call (or smartphone) the closet cab to the fare is chosen, and it's hard to get close to fares without driving around, because parking the cab downtown is expensive and slow.
So, cabs use the city's public streets as mobile parking lots, hovering close to potential fares, snarling traffic, and emitting greenhouse gasses until they snag one. Increase the number of medallions, and you have a corresponding increase in the amount of traffic in a city as cabs wander around fishing. Cab drivers don't care if they're slowing everyone else down. They just want to earn a living.
So it's better to have fewer cabs busy 100% of the time than more cabs which aren't always busy. Thus, medallions are scarce.
Recently NYC decided not to issue more medallions, because the increased availability of cabs would be more then offset by increased time to get from point A to point B due to more traffic congestion.
This is a strong argument for regulating this new breed of unlicensed cab services. They must not be permitted to loiter around in traffic hoping to be the car closest to the next fare. They must either have a medallion or be parked when not actively on a call.