Learning that you are not being considered for a position or didn’t make the cut after several interviews is disappointing. So it goes without saying that sending off a thank you after you have been let down can be a challenge. That is why so few people do it and exactly why you should. If you have been through the interview process and not been offered the job, send off a brief thank you. You may also do this if you have applied to a smaller organization and not made the initial cut. Reassert your interest in the company and ask that you be considered for future / similar opportunities.
Graciousness in the face of disappointing news is a very attractive quality. A thoughtful and positive thank you might just make the employer say “Wow, I kind of wish we had chosen her.”
And here’s the thing, there’s a lot that can happen after the position has been filled. People don’t work out all the time. Similar positions open up. You may just get a second chance. I saw this exact thing happen recently with one of my HR consulting clients. A candidate sent a fantastic "thanks anyhow" message, and the company called him to let him know a similar position was being posted in a few weeks. How surprised was he?