Laziness and lack of education
The essential problem is that software development is entirely unregulated. Anyone can call themselves a software engineer and they legally become one.
What you get is people with accountancy degrees, art history, etc deciding that they've studied the wrong thing, and they see software development as a possibly lucrative second career option. This is wrong. They have no formal training (everything from binary or logic gates through OO & functional, on to CI/CD and devops) and they simply learn by doing. They've no proper understanding of encryption and not the first clue about computer security.
Why on earth would the doctors who specify what a pacemaker must do and what it is to achieve, the engineers who design it, and the manufacturers who build it all require certification and licencing, and yet the guy that knocks the software up that runs the thing could have been working in McDonald's a week earlier.