So ripping out existing serviceable train tracks is stupid (or alternatively: evil) if you think in the long term.
However it is impossible for the operational and maintenance costs for a bus service and for the roads on which the buses go to be cheaper than for an electric streetcar, unless some prices are fake.
It is true that I have seen enough cases where electric streetcars have been replaced by buses, but I cannot see other explanation except bribes, because it was extremely visible that the buses were more expensive, both because of the fuel consumption and because of the much more frequent repairs both for the buses and for the roads.
Bribes and the mafia may have been a factor[0], but that's how American cities do things.
[0] eg. https://www2.startribune.com/streetcars-buses-minneapolis-st...
I think you're making a different argument, where trains attract a more well-heeled commuter. Which is why many cities have brought back LRT as part of a redevelopment plan.
But _at the time_, buses were very competitive with trams; there wasn’t all that much other road traffic, so they weren’t really slower (and they could use the tram lines, while they existed, as a right of way), the trams of the time were non-articulated, so buses had similar or higher capacity, and they were more flexible. It’s easy to see how it happened, and it only became apparent that there was a problem when it was far too late to reverse.
There are really two problems with buses vs trams; buses are slow when there is lots of other traffic, and, _with modern articulated trams_, higher total capacities are achievable (one of Dublin’s modern tramlines has trams that take over 400 people with a frequency of under 3 minutes between trams at peak, which is a level of capacity that you just can’t really get with buses). Neither of these were factors when the first-generation trams died.
Very few tram systems worldwide actually survived from the early 20th century to today; while there are lots of trams today, most are second-generation systems put in from the 80s on.
(I lived in a streetcar part of SF, and loved it, fwiw. But the only reason it's still there is a tunnel.)