About hiring junior devs. You have to understand, most engineers that interview you don't understand or perhaps simply don't appreciate the concept of ROI. So, they're not thinking, geez we can get a guy with a few years less for 20k less and still come out way ahead. No they're simplying thinking, we want the best possible talent, regardless of cost. Very few people in the hiring process actually know how much that developer will cost, nor do most people care. This leads to a huge bias for more experience developers.
Furthermore, the engineers that interview you may be excellent engineers, great at programming and design but probably have very little experience or training in Hiring people. I know when I started interviewing people I made mistakes. It wasn't until I had a good 5-10 people under my belt that I really got good at hiring people. Most companies don't dedicate much resources to training devs to do hiring, partly because leads and managers often don't know how to do it well themselves. this leads to all kinds of mistakes.
My advice to you, is try not to take it personally and think any less of yourself. Failing an interview isn't necessarily your failure, it could be the ones who interviewed you that failed. But, it never hurts to learn everything you can and always expand your knowledge. There's nearly an infinite amount of Free tutorials and learning resources online, so learn as much as you can.