Programmers aren’t necessarily engineers tho, software engineers are, but not all programmers are software engineers. Even then, lots of people are trained as SEs and then just end up programmers.
"Software engineers aren't real engineers because they don't work on physical engines."
-An absolute dumbass telling me this to my face years ago while literally designing a software solution for (hardware) engineers on a manufacturing line
My work says I'm a, "security architect II". I believe he physical world manifestation of that would be... the guy that plans where the security guards should stand? Actually, I'm "II" so I'm probably more like the guy who gets escalated to when the guys that do do that need help 🤷
Programming is just one part of the whole process of creating software. There's more than just writing code. There's also planning, design, architecture, testing, deployment, maintenance, etc. All that is engineering. Unsurprisingly, people with software engineering training tend to have a more complete idea as to what goes into it all.
Let’s say I’m a carpenter, and occasionally I open up a cad program and draw up a wrench or lathe chuck and have it cut out of sheet steel. Yes, I did some engineering but I’m not really an engineer.
Likewise let’s say I’m an artist. Maybe I write code now and then to program my automatic paint mixer or whatever.