What you say would make sense, if we were dealing with a normal threat, but the crux of the matter, and it's been an essentially plot point since volume six, is that Salem is literally unkillable. Besides that, it has also been established that this is the greatest grimm horde in recorded history, and one which Atlas, the strongest kingdom with the greatest technology and literally the only army, stands no chance against. This isn't a matter of dealing with the grimm even if they can't get rid of Salem herself, the grimm themselves are so numerous and powerful that even fighting them is a lost cause. Case in point, Salem had enough grimm juice to cut through Atlas' defenses like they were made of butter
To put it in short, it's either fight and die or flee and maybe live. I'm talking about no convenient deus ex machina manifesting itself *couch*Ruby*cough*
The big failure in the show's storytelling is presenting the situation to actually be hopeless, making Ironwood's decision of retreat the only sound one, cruel or cowardly as it may be called.>but its been established that Atlas is actually in no way prepared to be self sustaining in that way.
This however hasn't been establshed. Ironwood says that they have the technology to keep atmosphere livable at that height, and it's Atlas that produces the food. The only argument against this is that the ratio of farm to city isn't realistic, which, fair, but that is not an actual plot point that's been addressed, just another case of the writers not bothering to be precise and hire agricultural consultants or something.
Again, none of these decision from Ironwood have actually LED to Atlas being lost. Salem always had the power to fuck the city over, Ironwood only had the power to move the city away from her, and Ruby took that from him. Ironwood didn't open the gates, in fact Watts didn't either, so Ironwoods alliance with Watts can't even be used to put blame on him. It was all Salem bruteforcing it.