That is surprising to me. I'd expect that your peer getting a promotion over you drives a lot more people to leave than someone external being hired for that position.
Psychologically, I think I understand. Selecting a peer over you means they were slightly more qualified than you, it could happen to anybody. Selecting an outsider means you weren't even remotely considered. And if they aren't seeing you and your contributions maybe another organization might.