Answer: Rationalization
Rationalization is one of seven psychoanalytic defense mechanisms proposed by Freud. When people use rationalization, they justify their behaviors mentally, even if their behavior isn't correct. One example is when someone justifies cheating on a test because "everybody else cheats at some point."