In this scenario, chad's explanation best illustrates the defense mechanism of "rationalization".
Rationalization happens when you endeavor to clarify your awful conduct away. Consider, for instance, that you have a nonsensically irate response to a circumstance before somebody you like and need to regard you. At that point to endeavor to legitimize your conduct, you accuse another person for inciting you. Regardless of whether that might be valid, it isn't the genuine purpose behind your upheaval, it's a reason. Legitimization is an especially normal instrument for those with more delicate egos.