It's because coding is seen as a trivial job despite requiring the same amount of education as an ME. Society has this imagine of 14 year old hackers that can do it with minimal training. So it's easy to convince them that some mechanic that lost his job can retrain to become a coder, because, if a 14 year old could do it...
Computer Science is poised to get more difficult in the future, not easier. New companies/technologies will come along offering products that eliminate the need for low-skilled programmers, leaving the more difficult, high-skilled jobs. The tasks that get easier will no longer require a specialized developer, they can instead be done by a person with an understanding of that specific domain. Leaving the rest of the programming jobs a little bit more difficult. (I think the skewed ratio of senior to entry level programming positions is evidence of this phenomenon in action)
I got my start as a teenager doing small e-commerce sites for people, but I'm not sure the "dedicated developer for a small e-commerce site" job exists much anymore. They have been replaced by Shopify, WIX and even Amazon. And once these companies out-grow their platforms, they need more experienced people to build something more robust.
I think we are doing society a disservice by convincing people that anyone can A) learn to sling some JS, and B) make $80k a year doing it. Easy jobs that anyone could do are not jobs that pay 2-3 times the median salary of a region.