This phenomenon has been known from ancient times. A slighted ego is a powerful incentive to turn to the other side. For example, in the ancient Indian work on statecraft, the Arthashastra, Chanakya lists the kind of personalities who can become spies: See Chapter XIV of the Arthashastra:
https://en.wikisource.org/wiki/Arthashastra/Book_I