you purchase a rail ticket which means you enter a contract with the TOC to travel between 2 points. The fact that they then put you on a replacement bus is immaterial. you still haven't paid for a bus journey you've paid for a rail journey. They have just transferred you to a free, gratis, complimentary replacement bus. So you, as a passenger, haven't paid a fare to travel on the bus...
I'm not sure that follows.
When travelling on a train last month our five-year-old got a free activity pack, with wordsearches and the like in it. That is unquestionably free: the operator didn't have to provide it, and we wouldn't've had any valid complaint if they hadn't. The operator can choose to hand out puzzle books to anybody they want, passenger or not.
But in the case of rail-replacement buses, I — as you say above — have a contract for the train operator to get me to a specific destination. The only reason they are providing a bus service for me is because I have bought a ticket from them. It isn't valid for somebody to travel on the bus service without a ticket. And if the train operator doesn't provide the bus service, they (the train operator) will have to provide me with compensation for not getting to my destination, or reaching it late. There's enough there that makes it not obviously the same sort of ‘free’ as the puzzle book scenario.
Most relevantly, I have had to pay something to the train operator (not the bus operator) to be allowed on the bus. And that opportunity to do so is open to any member of the public.
now it could be argued that the train operator has paid a bus fare on your behalf... but they haven't. that's not how RRB contracts work.
Sure. From the point of view of the bus operator, they are undoubtedly providing a contract service (to the train operator), not a public service. That's because the rail operator (with whom the passenger buys a ticket and has a contract) has chosen to subcontract bus provision to a third party, rather than, say owning a fleet of buses of their own ready for deployment in such a situation. That's an entirely reasonable business decision for the train operator to make, but it doesn't mean they can avoid their obligations to their passengers.
From a passenger's point of view, the train operator is putting on a replacement bus for them. How the train operator makes these buses appear and the details of any contracts they have with bus operators (whether by directly employing bus drivers, contracting a local bus operator, or using a mysterious chain of shell businesses flowing through the Cayman Islands) doesn't affect the relationship between the train operator and the passenger.
If I buy some bread from a supermarket, and when I get home the bread turns out to be mouldy, my contract was with the supermarket, and it's up to them to remedy the situation or compensate me. It doesn't matter whether the supermarket baked the bread themselves in an in-store bakery, had it baked under contract by a third-party bakery, or bought it through an unnecessarily long-winded chain of wholesalers. The baker may well be providing a contract service, but by the time it reaches the customer, it's a retail service.