With the boundary between the BR▸ (WR) London Division and the West of England Division near Lavington, I think Bedwyn was chosen as the last station in the London Division. Beyond that, into the territory of the Bristol folks running the West of England Division, there was a far grater zeal to shut stations and reduce any remaining services to as little as could be got away with. London Division tended to keep stations open and stopping services remained a thing on their rails. But cross that divisional boundary, and different rules applied.
Back in the
GWR▸ /early WR days the boundary was indeed at Bedwyn which was indeed the last station in the London division with everything west of there up to and including Castle Cary in the old Bristol division. That said though, I can't see the case for keeping Bedwyn open would have been that great compared to Hungerford and east. I'm not quite sure when it was moved to Lavington but if it was still at Bedwyn then given what you said above, it's suprising that Pewsey survived.
Actually had there not been a need to serve Pewsey, I wonder if closure of the line west of Bedwyn would have been considered with West of England services instead routed via a double track Weymouth Line from Thingley Junction to Westbury. This would have been longer than the direct route but would have still been shorter than going via Bristol and any significant time penalty could have been reduced by line speed improvements. Had this been done then maybe we'd now have a regular direct service from Trowbridge and Melksham to London.