Getting rejected is a common thing while applying for a job. The decisions taken by the company may be not right, which they will definitely understand after few months/years. The companies won’t tell you the parameter on which they evaluate the candidates. I know that the hiring process is totally broken, but most companies follow the same broken procedures.
It’s the company’s loss, when they reject some eligible candidates. But, it will be a great experience for the candidate. It teaches a lot about companies, their decision capabilities and about the growth of their product. And how to filter companies before applying. Most of the time judging is easy when you see their ‘About’ page. It comes with the experience and sometimes it may go wrong but most of the time your experience will be right.