International law, like any other, is entirely meaningless without enforcement.
Life isn't fair, and states can unilaterally do pretty much whatever they want until someone stops them, or penalizes them to such a degree that they stop doing whatever it is whoever else doesn't like. Calling it illegal is just noise.