I think that the engineering mindset (adherence to the scientific method, evidence based decisions, planning for the future etc..) is one that is definitely shared by both groups at least.
But you can absolutely get away with building software without proper engineering standards. It's not so easy to build bridges that way.
I'd wager that it is but the stakes for failure are too high to wing it (hopefully).
Imagine:
We want to build a bridge that spans N meters. We don't know how to do it but we can go look at an existing bridge and copy it. We might not understand metallurgy / physics that well, but we talk to suppliers and ask for "steel of this shape and size". Ditto cables, concrete and everything else.
Probably, provided we're not scaling up or changing the design too much, it would work just fine.
When software goes wrong, the effects are more often than not, intangible. When mechanical engineering or electrical engineering goes wrong, people can die.
Software can obviously kill people too, it just happens less. Then industry practices revert to the mean due to cost cutting.
I’ve always thought it is a little bit of a stretch.
It tends to make more sense for me. A book that starts out as a romance is just as hard to convert to a spy thriller half way through as a bridge and a tunnel (Ok not total effort but in terms of percentage of rework)
It's essentially applied physics.
Software is more like nailing things together in the hope they might work. ML has some modelling, and formal methods are available for mission critical projects.
But the rest is mostly nail guns and glue.
Engineers have never done themselves any favours with the "engineering" label. In many countries, especially English-speaking ones, the job doesn't get the respect it deserves.
Most people have no idea what the job involves. They literally think it means someone with an oily rag who fixes cars and/or computers and/or drives big machines around to make bridges and tunnels and such - like a house builder, but on a bigger scale.
* Mathematics isn't only about calculation and applied physics. When you write a simple algorithm and convince yourself with a logical argument about its correctness, time complexity, etc. that is math too. You also do calculations when you design various systems (latency, throughput, etc.)
* I know a dozen mechanical, structural, and electrical engineers. They almost never model anything from first mathematical principles, they use well known tools and methods they learned. Their "nail guns and glue". Actually I think most of them don't understand math/physics behind it very deeply. So even if those methods are underpinned with mathematics and physics, it's abstracted away most of the time which is good for practical purposes.
Even in "user-interface programming", I often had to use math, algorithms, etc. In other parts of software engineering I used it much more.
Depending who I talk to, I use "programmer" or "software engineer" most often.
I'd use "software engineer" if I could in good conscience, but "software developer" is pretty neutral while still being accurate.
As so, I'd consider software development can qualify as engineering. If you're taking the work of computer scientists and mathematicians (or any other science fields) and applying it to software, it fits the definition. If you're just laying code to a given spec without much more thought, then you're just a programmer/developer...