Ever work with an engineering team? Building new weapons systems? Fighter planes and the like? Just as creative an endeavor if not more so than software development yet they have schedules and budgets to meet too. And yet people's lives depend on the result. Software development can learn a lot from other engineering disciplines.
Software dev isn't driving this, business is. NASA coding practices prove we can do exactly what you're saying, but businesses don't care for (or don't often need) the rigor that NASA requires. I'd bet a lot of people would enjoy participating in NASA-quality projects if only to experience it and feel good about producing rock-solid code even if they only commit 50 lines total, but they are very rare.
I feel like you might have missed the point. Also you're assuming these engineering teams for weapons systems and fighter planes are successful by default.
Not all engineering projects are successful either. What I'm saying is there's a lot of similarities between these disciplines and so there exists a large body of knowledge and experience from which we can cull and learn.