However, OP's main example is the NYC metro system, which is decidedly not cheap. A similar problem occurred in SF: BART cars are being replaced with multi-$M cars full of electronics & are now having numerous breakdowns.
BART drivers used to reboot the old trains by flipping 4 sets of switches. Now the reset process has hundreds of steps, so most drivers just take the car offline & call for a mechanic. And there's far more failure modes to the new cars as well. Thus: the new cars are more expensive, more fragile, & harder to maintain. BART scored a perfect 'Reverse Better-Faster-Cheaper'.
How did this happen? Politics & payola. The new proposed cars were barely shown to the public, & only for UX/design feedback.
The tie-in's to capitalism that OP describes are apt too: very big companies tendered their bids for these new cars. Maintainability wasn't a key design feature. It's not just our economic system (capitalism) that isn't interested in maintainability- our political system isn't either. Decision makers who won't be in power to see the need for their shiny new acquisitions to be maintained, never seen to care that they will.