First, I don't see why leaving a company should be seen as good or bad. A contract is signed setting the conditions under which the employer-employee relation can be finished. If you don't like that, you'll have to set tougher conditions (if that's illegal in your jurisdiction, setting worse conditions for everyone but then rewarding loyalty would be an equivalent)
I am not a software developper myself and there are already some good answers to this question (at least, the combination of all of them really gets into most of the aspects that lead to such high turnover rates). As a data scientist who also worked alongside many software developpers, I'll show my experience in this different but related field to see a little contrast:
1.- We often don't need the job: many people stay in their jobs simply because they don't have an alternative. They need it to survive. For a profession in high demand, this is rarely the case. There's always another chance. We don't fear long periods as unemployed. There are many opportunities and those are in a wide range of places and sectors, while other type of worker may one be useful to a few companies. We will leave if we get tired of dealing with some of the following:
2.- Not enough recognition: this is probably not so true for data scientists as software developpers but I'll include it anyway. In most present day companies, a faillure in the digital part of the business often leads to a temporal collapse of the business. While software developpers are well paid, it may not reflect the extent to which they are fundamental to the company.
3.- Managers can't manage because they don't know what's going on: it's hard to report to someone that doesn't have an idea of what you are doing. Communication problems arise all the time. You can't imagine how many of those could be solved if only the managers had the most basic knowledge of what the people below them are doing (if you deal with programmers, take a programming course even if it's for one week!!). I've once had an interview with a small/medium size business owner who wanted to implement "machine learning" into his company and when I asked what sort of machine learning-related problem they have, he said "I don't know. I just see everybody is on with that and I don't wanna lag behind"
4.- Expectations are completely alien to reality: despite managers being completely aware of the previous point, they will set all sorts of unrealistic deadlines. On occassion this would force the developpers to rush through their work and then deal with complaints about poor functionality. When complaints are raised, a generic HR/Marketing response about organization, teamwork and "everything is possible if we believe in it" is the response. Other times this will lead to some part of the team having absolutely nothing to do for weeks.
5.- Arbitrary impositions: also in spite of point #3, managers will often make technical decisions for you. I was once told to use the big data servers for what was a 100K-row Excel. On another occasion my boss insisted on using neural networks where a decision tree was good enough simply because he wanted to say we used neural networks.
6.- Managers don't know what your skillset is: they often see me as a "computer guy", so they'll just throw at me anything that is IT-related. Whether it's a problem with the OS or a big data project, they'll expect top-level performance from me.
7.- Eventually, you'll be doing the same thing over and over: In many of the jobs I've had there came a point where there was pretty much nothing new to do. The job became repetitive and that's definitely not what someone like me is looking for.
8.- Motivations are not the same: people in technical positions often have no real understanding on what the company does or how it really operates. Even when they know, they probably don't care. They'll be much more excited about using the new features of the latest library out there than about increasing customer satisfaction. You'll have to understand and deal with that.
9.- HR departments operating like marketing: I've seen HR departments like this time and time again in an effort to attract the best professionals. They'll announce the company as something completely different than what it actually is, focusing on abstract ideas and great-sounding buzzwords rather than explaining what the position you are applying to actually is. So many companies are doing this that it's not uncommon to see workers joining a company not really knowing what they're expected to do. Potential employees should not be treated like potential customers.
Why don't you try experiencing it yourself? If you want to understand software developpers, try to learn the very basics of programming! Not with the intention of being able to produce software, but rather to learn what takes time and what doesn't, what certain tools are used for, why dedicating time to documentation and project organization is important, how coordination problems can appear when working in big teams and so on