Learn to code for what purpose? It’s useful to understand how it works and what’s involved.
You don’t just learn to code. You aren’t likely to teach some non-technical person to code to the point where they can contribute to a project. People who are good at code have spent tens of thousands of hours honing their craft. It can be very frustrating and time consuming. It requires extreme focus and concentration.
They make people happy.