@Vedtraed Morality is a tricky thing in this case though, wiping out half a city is indeed immoral and even the Empire itself admits to that in the story even if maybe not officially.
But the whole situation was a special case, had it not been a vital point of logistics supplying the entire or at least most of the front they wouldn't have taken these kind of actions.
Neither option available could really be considered moral from their point of view, either they kill (mostly) enemy civilians, or they endanger the lives of a much larger amount of their own people.
And even if they didn't take this drastic of an action they would still have needed to retake the city which in worst case could have turned into a drawn out siege with possibly even higher numbers of casualities.
Though there is still a lot of details we simply don't know, like how long the front could have lasted without the railway hub or if the insurgents would have kept fighting even in a situation of the city being starved in a siege.
It is even possible that the Empire would have been desperate enough in retaking the city quickly that they would have ended up commited a massacre even without a legal loophole, Tanyas actions might possibly have just made it happen sooner rather than later, and I think the republic could have ended up doing that as well if the situation was reversed.
Personally I would say the massacre was unnecessarily bloody even for the intended purpose, but I just don't think there was any morally good/neutral options available in the situation.
Though morality aside the whole situation felt contrived, the city was too weakly secured for it's importance and it would have been better if the loophole was introduced earlier in the story or after the massacre had already happened with them trying to find an excuse, not right before it is going to be used.