Self-serving bias
A self-serving bias occurs when we interpret the world in a way that is beneficial to our sense of self. This is not necessarily a bad thing, but it often is.
This leads individuals to attributing positive events and successes to their own character and conversely, attribute negative events and failures to external factors beyond their control (See Figure 1).
Practical examples
Self-serving bias is exhibited at work in such examples as to when someone says they were hired for a position because of personal factors, like their exceptional resume or other sterling qualities. But if they don’t get the job, then it’s because of some external factor besides their own shortcomings, like an incompetent organization or a short-sighted hiring manager. In the eyes of someone suffering from self-serving bias, it’s never their fault.
It's often due to the ego, self aggrandising or conversely, avoiding the cognitive dissonance of failure.