Do you know any other major industry, where people with little or no formal training can get in and up so fast? Where people in their early or mid twenties routinely make 6 figures? I don't.
The median salary is now above 100,000. https://money.usnews.com/careers/best-jobs/software-develope...
That's roughly on par with chemical engineers but whereas (almost) all chemical engineers have at least a bachelor's degree, an increasing amount of software developers have no other training than online courses and still make salaries that would make other professionals with 4-5-10 years of education envious.
I love online courses, but try get a job as a chemical engineer (or any other engineering job) with just some online courses. As a software engineer that would only be an issue with some of the most sought after places, like Google.
Yes, I am sure there are a few thousand petroleum engineers in Texas and other niches that make more than software engineers, but generally, engineers make less.
When oh when are we going to get these salaries in the UK.. because I'm not seeing them.
If that pool is small, as I believe it is, there is no room for the idea that there are enough engineers. "Knowing how to hire", attractive benefits, locations etc are only ways to outcompete other employers, not a sustainable industry-wide mitigation of developer shortages.
After you get hacked you get someone to ask some basic principles around the job, especially anything around security, and you soon see the lack of devs problem.
After a while you end up with the guys who glue code together, or the guys who call the MSP, in charge again and they don't understand the basics, so you no longer quality problem and you have an abundance of options again.
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.