To answer some observations above... at the time of booking I didn't know there was a direct service from Haymarket to Motherwell, I only found out when checking my train timings on departure day. For some reason I cannot now recreate the itinerary I was offered for the same really cheap price (£12.45 with railcard), using a random date in early November.
I did not specify any via or change at points when booking, I just booked the bargain price that was offered. Funnily enough if I put in the 'change at' points now I can recreate it, but I didn't do that when originally booking and Trainsplit found it anyway. I've just discovered that even cheaper tickets with just one change at Haymarket, and arriving at Preston two hours earlier are actually available, but they weren't offered so perhaps already fully sold out. Never mind, I'll know for next time!
Fortunately my journey passed off without incident. I didn't deviate from the booked TPE train time, and Scotrail guards didn't seem too bothered so long as I had a ticket to show them. At Dunfermline station there were a couple of presumably RPIs at the platform entrance, but again they just glanced at my ticket and happily waved me onto the just arriving 09:13 when my itinerary was for the 09:24. Of course they wouldn't know that from the ticket.
All points taken on board, I realise I was probably doing an illegal thing and I will take more trouble to book what I require next time. Thanks for all the comments and points of view.