Before the suggestion was deemed offensive, politicians, media personalities and other people who generally have no idea what they are talking about were seeing the rise of the computer industry and suggesting that everyone (excluding themselves of course) needed to learn computer programming because in that would be an essential skill for everyone to have. While it is true that more and more household appliances and devices are being sold with some sort of internet connectivity or other advanced features, there will never be a time in your life when you will need to edit and recompile the source code of your smart fridge, and even if you thought you did smart fridge manufacturers wouldn't let you. Where these people do have a point is in the fact that the software industry has been growing since it's inception and is projected to continue in its nearly exponential growth, and while programming is a great job, it (like any other job) is not for everyone.
So why is it that I think you should learn to code? Why is it that you should learn how to use simple tools? Using a hammer ceased to be an essential skill years ago, and as far as I can tell IKEA is trying their hardest to rid the planet of phillips head screws, but proper use of these tools have not ceased to be useful. With an understanding of how to use basic tools you can build yourself a shelf to put things on or craft some piece of artwork to enjoy, sure professionals will be able to do a better job but there is no substitute for the satisfaction of having built something yourself. There are also some cases where what you need or envision is not really available. Recently I helped my dad build a gate large enough to back all of his trailers into the side yard. Because of the shape and slope of the area we were putting it in, a traditional swinging gate wouldn't have been feasible so we manufactured a solution that allowed us to easily remove and replace the fence panels rather than swinging them. The solution to our problem wasn't one that could be achieved without the arguably non-essential skills we had. Whatever reasons you have to learn how to use a hammer translate to reasons to learn to code.
In the past few months I have come up with these sorts of scenarios as reasons for me to write various programs. In a recent article I wrote on this blog I expressed my intention to write an RSS reader because I am dissatisfied with the ones available to me. Another, much simpler, project I want to work on is to recreate a minigame that my sister and I played on a Playstation 1 at our great great aunt's house once. Also a rather unique problem I have is that I shop for books at thrift stores often and can end up accidentally buying books that I already own, this is one I have been able to solve with a simple program that I wrote in only about two hours over the weekend that allows me to enter in all the books I own to be saved, sorted and formatted to be easily put in a web page on this site so that wherever I am I can see what is in my library, and you will be able to as well if you're curious. I'm not interested in any of these projects so that I can put them on a resume, I want to build and improve these things because they are things that I will actually use.
With the right knowledge and skill, even if it is only a little, you can see solutions that you may have never thought of, or even solutions to problems you didn't even know yuo had. I once read a story of a guy who had a job that boiled down to basic data entry on a computer. It would take all of the guy's coworkers a full day to complete a full document, but he realized that the task could be automated so he wrote a basic program to enter the data for him and he was able to finish multiple documents a day. His employer, not realizing that he had automated his job, saw his output, assumed that he was typing the data at an incredible speed and laid off his coworkers since he was doing their job on top of his, when in reality the guy would just run the script only a few times and sat at his desk doing nothing most of the day. People without the know-how don't see what could be or are afraid to try it. I once had a job fairly similar to this guy's, I wish I had explored the possibility of automating my work rather than straining my hands doing the same repetitive task over and over again for weeks.
Anyone can benefit from learning the basics of programming. My favorite YouTube channel is one by a guy named Luke Smith (he was actually my inspiration for making this site). Most of his videos highlight various Linux programs and functions. Most people on YouTube making Linux content are computer programmers or networking geeks, but not this guy, he is about to become a PHD linguist and has a bachelor's in economics. He has never had any formal training in programming but he has written his own custom email client that provided offline functionality that he needed but other services didn't offer. The guy has made more programs and scripts for his own use than many professionals ever will for theirs.
In conclusion, you should learn to code, for the same reason that you should learn to use a hammer, or to maintain your own sprinkler system, or to work on your own car. Sure you may never have or want a job doing any of these things, but when you find the use for certain skills it sure is great to have them.