Actually they disappeared as the network was prepping for franchising.
They disappeared from nationalisation (and even before nationalisation) onwards, because the railways have always had to operate in an economical manner. British Rail moved to a fixed formation railway in most places because it's cheaper to run a railway that way. That meant station pilots could be done away with. They ran shorter trains because the cost of running the long ones wasn't justified. The relief crews and relief stock sat around doing nothing most of the time. The excursion stock was used even less of the time, so was an obvious cut when the British Railways Board started taking it seriously.
There isn't a railway network in the world that runs a profit.
There are several, in fact, but I imagine you're not particularly interested in pure freight haulage systems.
In my experience, dividends on shares tend to be paid when there is a profit. Three years ago they paid 21m in dividends to shareholders. Two years ago Northern rail handout to shareholders was 14m. Where did this money come from? It wasn't from profit.
Of course it was. The government paid Northern Rail a sum of money to run the service, in exchange for the right to take the revenue generated by selling fares for that service, as calculated in a specified, complex way.
Provided that Northern Rail were delivering the agreed service, they were paid the agreed sum of money by the government. The government, in turn, doesn't much care whether the operator makes a profit, just so long as they remain solvent. Northern Rail
could have worked the railway in a more expensive way, and made less money, but the shareholders would have been rightly unhappy with that.
The government could have stated that they wanted Saturday seaside specials, a second crew for every train in case the first failed to show up, locomotive-hauled trains for a station pilot to shunt around, and all the rest of it. And Northern Rail would cheerfully have provided a price for that. It would have cost the government a lot more, though, which would have to come from public funds.
There
is a tradeoff between cost and convenience. Efficiency and effectiveness aren't the same thing, but ultimately someone has to draw a line in the sand and say that providing a certain level of service is unaffordable. It's certainly arguable whether the line should be drawn here or there, but a nationalised railway would still have to draw it somewhere.
Perhaps the TOCs taking a couple of percent of turnover in profit to provide the service isn't the best way to run things. But it's hard to imagine a not-for-profit railway providing the service in a significantly different way, because efficiency demands it. And the government, on behalf of taxpayers, demands that public money is spent responsibly - which means efficiency.