Companies sometimes forget that you can't just replace top talent. These are not minimum wage jobs where you can just hire anyone and they'll do about as well as anyone else. Software engineering is a highly skilled specialized job that relatively few people have the skills for to begin with. The difference between top talent, or even middle talent, and bad talent is huge. You can't just hire anyone. It's insanely hard to find, hire, and retain good software engineers. Most people who are good at software engineering are not available, they already have jobs and don't plan on leaving. Companies for decades have been trying to make software engineering more replaceable, but those efforts have largely failed just because at the end of the day this is an insanely technical and difficult field.
There is this myth among people who are not software engineers that software engineering is easy. You can't just "learn to code" and then get a job in the field any more than you could "learn to weld" and then design engines for fighter jets. This is a real field of engineering that is insanely technical and very complex, and if you don't believe me, pick up a copy of "Introduction to Algorithms" by Cormen et al, and just try to read it... and that book is an introduction! It's intro level! The people who are good at this job have dedicated their entire lives to it. They have lived, eaten and breathed this stuff since they were old enough to use a computer, and it took all of that time and effort just to get "good enough" at it. You can't just find talent anywhere, it is a serious engineering discipline. You're not dealing with McDonalds employees here.
Even if you find someone new, it's pretty well known that it can take 6 months to a year to get new hires up to speed.
In the 70s, 80s, and 90s, talented groups of engineers used to leave big companies to found their own companies, often competing with their former employers, sometimes with enormous success. This trend was so common that companies started to require employees to sign "do not compete" clauses. If an entire talented team like this leaves a company all at once, they can very easily found their own company, and put their former employer out of business. All the money in the world isn't going to help you if your team sucks, and all your best talent just left to compete with you. I think companies have forgotten just how much power groups of top talent have.