Maintenance, perhaps? For the London Underground at least, the power is switched off after the trains stop running (4th rail) so workers can safely go onto the tracks.
Also, it would almost definitely run at a loss (excluding externalities)... same reason why many Chinese cities' subsidised metros close quite early. Agreed that it's probably beneficial in the big picture but maybe hard to justify to superiors?