They did in the beginning, and actually made more than in freight haulage in certain cases. Then states suddenly “discovered” their taxation powers, under progressives. Also, when states started taking over roadways and cars and trucks were up and coming, they specifically targeted railroad companies for “competition”, giving special rate privileges to truckers operating on their roads, ad nauseam.
The last time passenger rail was profitable in spite of the aforementioned taxation was WWII.
Wilson’s USRA period, where the federal government first pulled a takeover of the rail system, was an unusual one. It was also the first time the US rail network shrunk, due to what they called “duplication” (i.e. competing systems) and forced shared operation by one road over another. They did attempt standardization of steam locomotives, most of which were custom-built and needed to be because of unique characteristics of certain railroads.
During World War II, the feds left the railroads alone, and they performed admirably.
The history of the American Railroads is a classic study of business and engineering, unfortunately it is completely ignored, as is most history, in our “education” system.