I'm not sure what percentage of routes are like this, but I assume it's non-trivial because predicting demand is a tough problem.
Low-demand, niche routes are necessary for a public transit system to work for its users. Sure, 80% of my trips might be on 2 or 3 routes. But without access to the handful of routes I ride the other 20% of the time, the system wouldn’t work for me, and I’d need a car to get around.
For example: when I take the bus later than ~9pm, I’m often one of just a few people riding it. But knowing I have the option to take the bus late at night is critical to the system feeling reliable. This allows me to live without a car.
Hopefully, this effect reduces congestion in my city, as more people are enabled to live low-car or car-free.
Demand predictions are pretty robust these days. Civil engineering is an entire science.
For example, public transit takes people off the road and keeps commutes for other people reasonable (or at least makes them less bad). Which is why it makes sense for public transit to be subsidized by people working in a region even if they aren’t necessarily using it.
If public transit is good enough, it can even make it so people don’t need to purchase their own cars+gas+insurance, which is a huge cost savings. You can argue that this would be more fairly priced with fares than taxes, but again, cars off the road (less parking infra, less air pollution, etc). Only capturing this value via fares turns this from a global optimization problem for a region into a local optimization problem for each agent
Also some public transit does pretty well with fares anyway. Caltrain covers about 75% of its operating budget with fares (and parking and some other minor income sources).