It takes money and (probably more importantly) personnel to operate a rail line. Think regular inspections and repairs of tracks and stations, cutting of trees, operating switches, controlling traffic, regularly updating schedules (so the trains actually make sense in the greater scheme of things), actually driving the trains, cleaning and maintaining them, and replacing them.
Again, I’m no expert, but I hold the belief that even a fancy bus line is orders of magnitude cheaper than a train line where demand isn’t high.
Buses never have any real advantage over taking one’s own car on the same route. Trains can have an advantage because they are more comfortable and can bypass traffic jams.
Buses allow you to do different things en route, just like trains. And they aren’t necessarily less comfortable than trains. Your argument about traffic jams is moot. There are no traffic jams between small towns.