International Law is not a law like city, county, state, national laws. There's no court and enforcement agency that can just enforce it. It's a set of agreements between countries. Enforcement (if any) is done by countries based on the goals of those countries. There's no sense of honor here. Yes breaking international law to punish others breaking international law happens, and is sometimes the only reasonable action to take.
It's the prisoner's dilemma. It's better to cooperate, but if the other party defects, your best option is to also defect (which serves as a motivator to renew the cooperation).
The point in having the International Agreements is indeed to honor it.
But only as long and as fully as is possible in the real world
When bad actors deliberately refuse to live within the agreements, e.g., Putin, who has broken nearly EVERY agreement he signed, there are only two choices. Push back with force, or surrender.
At the end of the day, the agreements work to prevent war, but only so long as everyone agrees to be bound by them. When one party unilaterally decides to break out and try to take territory and rule by deception and force, if we fail to respond, the agreements all become moot; the facts on the ground will be that the one who broke the agreements owns and rules everything.
It's brutal, but the agreements exist only as long as everyone follows them.