What does for a train mean "driving on the left"? Trains don't overtake, they don't give priority, they don't drive through roundabouts, for all what matters they could drive on top of another and the experience would be exactly the same.
As to why: having this uniformity is useful in placing, eg, signals (which face in one direction).
Much more confusing in railways is which track is the “up” line and which is the “down” line.