rationalization
Making up a good-sounding excuse to hide the real reason.
A rationalization is when someone invents a reason that sounds good to explain away something they did wrong or didn't want to face honestly. It's a way of protecting yourself from uncomfortable truths by creating explanations that make you feel better.
When a student copies homework and tells himself, “Everyone does it, so it doesn't really count as cheating,” that's rationalization. The real reason he copied was laziness or lack of preparation, but he's created a more comfortable explanation. When someone loses a game and claims, “I wasn't even trying,” they might be rationalizing to avoid admitting they lost fair and square.
Rationalization feels different from honest reasoning. When you rationalize, you start with the conclusion you want (that you're not really at fault, or that what you did was okay) and work backwards to find reasons that support it. Real reasoning works the other way: you look at the facts first, then reach a conclusion.
People rationalize about all sorts of things: why they broke a promise, why they didn't study, why they were mean to someone. The tricky part is that rationalizations can sound perfectly logical, even to the person making them up. You might genuinely believe your own rationalization.