The specific problem is that the alternative in the case of school lunches does not involve upgrading the payment system. Just because transit might benefit in the short term from not upgrading doesn’t mean school lunches would.
TBH I’m a little skeptical of the payment system story, it sounds oversimplified and might be agenda driven. All our transit systems need payment system maintenance and upgrades over time. Riders want & demand tap to pay, for example. All costs cut into and balance against incomes, but that doesn’t mean they can opt out, nor that it will save taxpayers in the long run. Keeping the old payment system might have rising costs and lead to reduced ridership over time, costs which may not have been assumed in the story you shared. I doubt the payment system is very significant compared to train cars, rails, crossing lights & gates, employees, etc.
We tend to cherry-pick and arm-chair debate individual budget items without seeing the big picture, in order to justify the preconceived claim that governments are bad at spending. Making families pay for school lunches is pretty funny when taxpayers pay for the building, books, teachers, and janitorial and food staff, the sum of which is literally thousands of times more than lunch. Debating the funding of school lunches is missing the forest for the trees, right?