Genuinely asking here: do you think the word "illegal" means wrong?
...no? But I think in this particular instance, obviously yes.
if a sovereign government decides it's allowed to do something, it's not illegal
...wat? Why would that be illegal?