That's one way to do it, as I said. The other way is to share the burden of the service by all of its users.
In the case of Taxi service, I find to be more appropriate users of the local service sharing the cost of the low hours. Central government paying for local services tends to be very inefficient.
The question is does society benefit from taxis being available all night long? If that is the correct question, and the answer is yes, then society should be paying for it.
By restricting the distribution of costs over only people who use taxis, then people who use taxis are unfairly shouldering a burden that society benefits from as a whole.
People who use taxis also get an unfair benefit by making a disproportionate use of publicly-funded roads which they don't pay for. Very few things are 100% private or 100% public. Most large organisations necessarily exist in a space of negotiation and compromise with the rest of society - you can use this public resource, but you have this public obligation. We'll reduce your taxes by this if you agree to provide that. We'll build this for you if you pay that. And why should the world work any differently?
I definitely sympathise with your main point - there's a tendency to see a problem and go looking for a nearby business to soak rather than funding it through general taxation. But assuming we accept that there should be a fleet of taxis that operate overnight to provide this socially-mandated service (and whether that fleet is directly owned and operated by the government or is something that private operators provide as part of a mutually agreed bundle of rights and obligations is immaterial IMO), for private industry to undercut the profitable segment of that service would be a both direct social loss (money out of the government's account) and a waste of real value (those expensive taxis sitting in the daytime).
In the case of Taxi service, I find to be more appropriate users of the local service sharing the cost of the low hours. Central government paying for local services tends to be very inefficient.