You did everything right prior to your interview. Your experience and ambitions lined up perfectly with the job. You researched the company. Had pithy things to say about them and about yourself. You came home and told your partner it was just a matter of days before the good news came.
And then instead of good news, you got rejected! Everything was so great! You wonder what you could possibly have done better.
Sometimes it’s because of something you did or didn’t do, unfortunately, the answer to that is nothing. Not all great interviews lead to a job. Sometimes the situation has nothing to do with you or your qualifications. It’s them not you.
A change in the job description
There are times when you have a strong idea about the direction you see for a project. Then once you start working on it you realize things aren’t going to work out as expected and you have to change direction. The same thing can sometimes happen to a company. They put out a posting for a certain job and then something changes and they realize they need to fill a different sort of position altogether.
Experiences and qualifications of other candidates
If you felt good about your experiences and qualifications, chances are you were perfectly qualified to do the job. However, you don’t know what other candidates brought to the table. One of them may have experiences that while not directly related to the job, made everyone look at the position from another perspective. Someone’s experience of teaching abroad for a year might give them an up on the communication skills front.
They already had someone else in mind
It could be that the company already had someone in mind for the job before ever posting the position. Someone from inside. Or someone who had some sort of association with them. There might also be someone inside the company pulling for a specific candidate.
Personality clash
You probably don’t hit it off with every single person you meet. Through no fault of your own it could be that the interviewer simply didn’t get the warm and fuzzies during your interview. If that’s the case it most likely wouldn’t have been a good fit in the long run anyway. You spend too much time at work for personality clashes to be an issue.
On the bright side you had a great interview. Bring the confidence of that into your next one.