The problem isn't that we fail to apply the same rules for software development in safety-critical and non-safety-critical contexts. The problem is that we do apply the same software in both contexts.
Gatekeeping the entire industry isn't the answer unless you want to cripple it... but if someone wanted to issue regulations along the lines of "Don't steer your nuclear-powered aircraft carrier with a Windows app," I wouldn't object to that.
A ton of businesses also die or crater in slow-mo after they have loaded up on tech debt and grown. Its less likely in pure software, as the exponential curve outruns the need for exponential devs, but it happens..
If there was 'code', arguably, nothing would be built in the first place.