I recall when the class 159s on the West of England line did have a trolley service. I then lived in Overton, about an hour from Waterloo.
If I hoped to buy a drink, and perhaps something to eat, from the trolley, the question was whether it would reach me in time. If I had boarded the train only five minutes or less before its departure, I'd have gone forward to where I could be sure of a seat, but the trolley might not get that far. Better, if there was time, to buy something at Waterloo rather than face the uncertainty of the trolley.
If my journey had been longer, there was the additional uncertainty about what would be left by the time the trolley reached me.
A crowded train would create difficulties for the trolley operator. I used to think that they'd be better to start from the front of the train. They would know from experience on what services this was the better option.
Of course there are many stations at or near which it is difficult to buy suitable food. If you boarded at an intermediate station, hoping to buy from the trolley, it might have just recently passed along the carriage you were in, and it might be some while before it returned.
On-board catering is probably loss-making. Many people carry a water bottle these days. If you really need a hot drink before you reach the end of your journey, a thermos flask offers a solution. It's possible to make one's own sandwiches, or buy some snack-like items, including healthy options for those wishing to avoid crisps or Mars bars. It is also possible to survive the journey from (e.g.) Wool to Waterloo without eating anything.
I recently went from my daughters in Dorset (from one of those stations without nearby shops) via London to Lincoln on a Sunday morning (first train starting from Weymouth) diverted via Chertsey and Isleworth, rather nearer 3.5 hours. Nearly double the time the LNER leg where food was served. And LNER First is rather more spacious for shorter journey than First class on a 444. Very inconsistent National service levels by DfTO operators
True, in several ways and for numerous and varied reasons, but unlikely ever to change.