On-demand means para-transit, a service to disabled people. Public transit agencies are required to provide that service by law, and it is more like taxi which costs the same as a bus fare. No question that it is a huge cost hadicap, and that it is a social service which will never break even.
It's pure social service. Why are these costs included in public transport?
And another factor for transit is that they need to size buses for rush hour traffic, yet run most of the day. Also, rush hour is often directional, meaning return trips are mostly empty. So a bus may make 4 trips full (2 in the morning and 2 in the evening) and 10 mostly empty during the day. That again means that average load factor is low and undermines overall efficiency. However, few people would feel comfortable going to work and knowing that they cannot return home till the end of the day in case of an emergency.
Last, but not the least - cost of driver's time is not recognized. I may spend a while getting to and from work - but the difference between being in the back or in the driver seat is minimal.
Once you have a professional driver, however, you need to talk paycheck, benefits, hours - hours being specifically difficult as you cannot ask someone to work 2 hours on - 6 hours off - 2 hours on to match rush hour pattern.
Moral of the story: transit is a difficult subject...
I always wondered why there are no separate (longer) buses for rush hour traffic. The driver could switch bus depending on demand. Maybe overnight buses are supposed to be in a depot. Who would drive the second bus there? That's a pure assumption. The same I have observed with government run trains. Outside rush hour some were quite empty.
Concerning buses for rush hour: I read employers don't like to take people who were more than half year unemployed. IIRC there is increased risk such a person is not used to get up in the morning any more. Well, driving a bus in rush hour traffic may be a nice way to keep more than three months unemployed people busy. I don't know how long it takes to train a bus driver. Well, Elon Musk can design the bus. It should be safe enough.
I have seen a train depot of a minor, privately run railway in Germany. The depot was somewhere in the middle of the line length. Depending on traffic they would add or subtract some units on the train. Each unit has two Diesel engines (front and back. For flat lands other trains with only one engine would be used.). Joint units can communicate with each other.
source: https://commons.wikimedia.org/wiki/Cate ... e_Waldbahn
see also: https://en.wikipedia.org/wiki/Stadler_Regio-Shuttle_RS1
Why is it difficult for the government, but not for private players to add/ subtract units?
These minor lines are auctioned in Germany for 20 years or so. The government describes the required standards and seating capacity. Ticket price is also fixed. The party who demands the least subsidy gets the contract.
If your government source is to be believed and heavy rail in the US has an average occupancy of 38 passengers, this might be the right electrical train for you:
source: https://de.wikipedia.org/wiki/Bombardie ... dergalerie
However this one already has 80 - 98 seats
It has the capacity to add middle units:
But this one already has 199 seats, so nowhere close to the 38 seats average of your government source.
"It comes in a number of variants, including high-floor, low-floor, diesel-mechanical, diesel-hydraulic, diesel-electric, electric, and tilting, and in lengths of two, three, or four carriages. As with most multiple-unit trains, Talent units can run individually, or be coupled together to form longer trains."