Logical fallacy
Two wrongs make a right
Conduct is presented as justified because another person committed a comparable wrong first. The earlier wrong alone does not establish that the response is permissible.
Examples
Their team shared our draft without consent, so it is fine for us to leak their private notes.
They broke the meeting rules yesterday, which makes it right for us to break the same rules today.