Thanks for your views.
What annoyed me was not being told something I didn't want to hear. He told me something I already knew.
It was the utter unfairness of being admonished, publicly and aggressively, by somebody who was either determinedly uninterested in why I couldn't buy a ticket at Menston or not very bright; I'm sorry to say that, but when I told him, "I know that I'm supposed to buy a ticket before I get on the train, but the ticket machine was broken, you can check that, and the queue at the ticket office was so long that I would have missed my train and I was there ten minutes early", his response was to parrot, "you're supposed to buy a ticket before you get on". Yes, I know.
I think I was supposed to stand there meekly to accept my telling off and failure to purchase notice, but I wouldn't. I'd tried everything reasonable to buy a ticket. I've never dodged a fare in my life; it's stealing. I think it was the fact that I'd been ten minutes early, and that the machine at Menston was broken, that made him (rather reluctantly) back off despite there having been an open ticket office.
I'm surprised that any business would alienate their paying customers like that, but I suppose that they have a monopoly on the suburban rail routes in West Yorkshire so they don't care!
If I were paranoid, I'd wonder whether the ticket machine at Menston had deliberately been left empty of tickets because there was a sting going on that day and Northern thought that they might collect a few more fines if it was difficult to buy a ticket before departure. I'm not, though, and I'd like to record that the ticket office staff at Menston are all lovely.