Do not lament someone else getting a promotion you think should have went to you
Sometimes the laws of nature are replicated in the laws of work.
There is a 'wild card' factor at play, a random element, an elemental chaotic element which means that it's hard to follow a reasoned sequence and determine causation.
Do not grow bitter and withered.