The film doesn’t actually need to explain this satisfactorily why the train has to keep moving, because the film doesn’t really say it does; the characters in it from whom the claim originates are established as unreliable or untrustworthy.
Focusing on the technicalities of what about the train makes it the Ark or what else might serve as such is losing sight of the simple fact that the train and everything about how it works and what it’s doing is by Wilford’s design.
The simplest answer for “why does the train have to keep moving” is: Wilford wants it to keep moving, or believes it must. Whether he’s right or wrong on this is secondary; the point of the movie is it’s his call to make regardless.
I’ll concede up front this is somewhat circumstantial, but I’m convinced that at least part of the in-universe reason is the same as the thematical reason.
That is, while the stated objective benefits - energy generation and melting ice into drinking water - are true, the train does that and it’s an important function of the train, it is not absolutely certain the a moving train is the only option. (Especially as it’s revealed to actually not be a perfectly balanced and sustainable environment.) And the way it is presented as such should give one pause.
The evidence we have is:
- As I mentioned above, the train appears to be crumbling and will fall apart eventually.
- Meanwhile the outside is shown to not be unsurvivable. Polar bears are an apex predator; the existence of one, many years after the ice age began, implies the Earth can host its whole food chain.
- Wilford is a fanatic about the existing order, to the point of being a deific figure in a religion of sorts venerating the train. The factuality of claims about the train made by zealous believers should be taken with a grain of salt.
- Wilford also plays 7D revolution chess to maintain (his idea of) the equilibrium, manipulating events to vent social tension while culling population back to what he views is a sustainable level.
- The school scene where the children are made to chant along to something along the lines of “if we went outside we’d all die!” might as well be signposted This Is Propaganda.
So, the narrative that the train must keep moving is, I’d argue, a little dubious even in-universe. It comes from Wilford and his proxies, and Wilford is shown to be both a deceiver and rather unhinged; his ostensible concern for the survival of mankind is somewhat contradicted by his disregard for individual lives. (Those of the tailies in particular.)
I believe the above are hints that maybe it doesn’t! (Even as it’s a slim maybe, in the sense that the chances of survival without it are significantly worse.) And Wilford is painted as the sort of person that, confronting this possibility, would reject it, since his plan works better; lie about it to get people to stick to said plan; and end up in denial over and rationalize away his plan’s failings. (Or he just doesn’t care about the tailies to bother with something for their benefit.) Remember that he’s adamant the stratification and the deaths and suffering it brings are necessary; that he’s in first place is a happy coincidence of there being, to his mind, no other functional arrangement possible.
If you have doubts regarding the explanation given seeming flimsy, it’s because the explanation as given in the movie was supposed to seem as smoke and mirrors. And the “political” reasons - easier control of society - aren’t just interpretation of a metaphor.
YMMV, I believe the story tells its message (of a broken system kept uhh… moving through ideology) better with this ambiguity in-place, if the “train must keep moving” isn’t a hard objective constraint serving merely as a convenient framing device.
In doing so, it serves not only to shine a light on the injustices of an inequal social order - and on the other hand, critique the revolutionary impulse, or the misguidedness of trying to right injustice by usurping institutions designed to impose it - but also to show that order as being arbitrary and the product of power. This whole arc is set up as a bait-and-switch, and in light of this, the train isn’t the only way for mankind to survive; it’s just the one a man with the power and resources to do so holds into place.