Two days ago I thought of making a job site that requires the employer to provide feedback, and the candidate to sign a form that says they won't sue the employer over the interview process. This way the employer has no excuse for not giving feedback.
Would you use this?
In your case, with one guess, I'd say that the test cases that were provided were just examples of things you'd have to do to pass. It's like the homework assignment where the professor gives you a problem to solve and some test inputs. You know that they'll run some "acid test" on your code after you've submitted it. Maybe it caught some corner cases that they considered essential.
That, or they didn't like something about your coding style (style is subjective, and you'll never have feedback on how they judged it). Or, or, or...you can come up with speculative lists all day.
5. In the current legal climate, if they tell you why, they may be exposing themselves to a lawsuit. They therefore impose a company-wide policy of never saying why they reject anyone. It stinks for the rejected applicant, but it's not because they're being jerks to the rejected applicant. It's because of lawyers. If you want to fix it, you're going to have to fix the law.
Keep in mind that a lot of companies use automated tests to filter candidates, not necessarily in the most fair way. They're simply not able to do a whole interview with everyone as it's extremely time consuming.
I'd say don't worry about it too much. If you have the skills you'll find plenty of good companies that will want to work with you.
Unfortunately, job interviews are not as predictable as how code works. Even the best devs I know get rejected once in a while. :)
Think about it - there's 2-3 people (interviewers) trying to asses whether a person has the skills for a job and is a cultural fit for the company. All of these during an 1-2 hour long chat. That's virtually impossible to do right, they can only guess.