I applied for an internal position. Aced the interview but still got rejected even though I was the top candidate. I later learned the person hired was a friend of my boss. I got tired of the office politics and started applying to other companies, and within 3 months I got a much better job. My old boss asked me to come back for the same promotion. I told him "thanks but no thanks."
Lessons learned:
1.You can be the best candidate and still not get selected.
2. If you didn't get the job, it was never meant for you.
3.You weren't rejected, you were redirected.
4. Your value does not decrease based upon someone's inability to see your worth.
5. Believe in yourself and keep trying, the right door will open for you.