..these days your knowledge, experience and potential definitely is not so important when you compare it with what an interviewer thinks about it. It doesn't matter if the interviewer is not qualified to rate your knowledge in a real world. If his experience and knowledge is much different and not so wide or not so big. He is a person presented from company which will decide your worth.... Unbelievable.
The interviewer is mostly the head of development or some smart ass team lead at some company. He is, mostly a person who works longest on the project and those are references which allowing him to rate you!
It can easily happen that interviewer is a person who has few years of experience and the longest part of his work at company could be doing some stupid peripheral staff on project. But in cases when seniors leave the project, so many times, companies fill that empty space with the next in a row ( person who is there longest on a project). Even if its a bad project, bad code, bad work organization, he is in charge of interviewing you and deciding if you are good enough for the company.
So many bullshit like these I am seeing lately!
I think that in my next interview ( if I decide to go on some coding challenges and so, I didn't do that last 4 years. I don't see a point in it), I will first ask more questions about interviewers and probably ask them a few questions before I invest my time in the hiring process. Especially in terms of technical tasks and code challenges. I think its fair to know more about who is the person/s who will rate your knowledge and experience. And of course, do I think they are adequate to do that!
I know this sounds not so usual, but I see so many bullshit and I don't need them anymore even if I need to change my profession!
To get a good job, project, company, team, its not easy, but when you meet them you will skip so much stupidness in this part of process.