OK so reading what you said again, are you suggesting that the act of discretion was the guard leaving the rear cab in the first two scenarios?
Is that unusual on this route?
In the first scenario a normal price ticket was sold to a passenger who had a reasonable excuse not to have one.
The first scenario involves the op seeking out the guard before boarding the train, to let them know of the difficulties and the guard responding by 'ushering us on and selling tickets'.
2nd scenario mentions 'again, no problem buying from the guard'. Now admittedly that's not as clear as I first thought when reading, I read that initially as colleague 1 also seeking out the guard, although it may well be that the guard was just walking through doing a ticket check. So I've probably confused matters by taking the first 2 examples as being the same.
Scenario 3 involves someone who didn't appear to try and seek out the first member of staff capable of selling a ticket, and therefore ended up with the rpi's at the station.
Discretion was shown in regards to the buy before you board policy in the op's scenario. In a completely black and white policy, guards would be refusing to sell from that station ' buy before you board or speak to revenue'. Obviously that would be completely ridiculous if they did so and no decent guard would. The op took the reasonable step of speaking to the guard before boarding, and had the opportunity to buy a normal priced ticket.
Essentially those examples show 1 person who did the right thing and got the right result(normal fare).
One example which isn't as clear(my mistake in first message to assume it was).
And one example where no effort has been made to pay at first opportunity and has therefore been penalty fared.
I'd suggest that there does appear to be a clear difference between example 1 and 3 , that is enough to merit the different response that they received from 'the railway'.