but maintained I could have been taken to court for fare evasion
Primarily due to the way the train companies are using a decision by the Secretary of State for Transport in 2005 to introduce a new penalty, as far as I can tell.
Read this thread - http://www.railforums.co.uk/showthread.php?t=133066
I really wish one of the guards had warned me that I should always buy a ticket at the station or this was a possibility but instead they happily sold me a ticket as if this was quite acceptable.
Write to your M.P., perhaps, if you want to take the point further, and see if he or she will pursue the matter with the DfT.
In areas with Penalty Fares schemes, if selling a ticket, guards are required to tell people that a Penalty Fare might have been issued precisely to avoid that sort of situation arising, and there is monitoring to ensure this happens. (Well, that's what the documentation says, at least.) So in effect we have the DfT insisting one thing is necessary to protect passengers in respect of Penalty Fares, yet not offering, perhaps even undermining, that same protection when it added the new penalty to the byelaws.