I ran across an interview with Big Boi, a music musician and producer. It's an interesting look at someone that has had a lot of success and continues to work, mostly because he enjoys it. I'm sure the compensation matters somewhat, but that doesn't appear to be his driving force. Whether you like his music, it's an interesting look at someone who lives by his creativity.
As I read through the interview, a lot of the themes and quotes could be attributed to software developers. We constantly need to learn more and evolve how we write code if we want to be more successful. We have ideas, and often the code we write today isn't the way we'd write code to accomplish the same task last year. At least, I hope that we would learn, grow, and write new code.
Certainly, many of us are compensated for what we know now, and often we can write the same code over and over to handle similar situations. This might be more true for people that work in Operations and manage systems more so than developers, but perhaps not. Even if we write similar code as in the past, we often do it more efficiently or incorporate small enhancements that help us. Perhaps better error handling, perhaps anticipating places where our code might fail or falter. These might be changes we hadn't considered in the last version of this type of code.
Not everyone wants to be a star or famous, whether a musician or software developer. Lots of us are happy to do a good job, leaning more heavily on past experience than evolving to tackle new challenges and produce a better end result. There is nothing wrong with having a career that accomplishes what is asked of us and nothing more.
However, the world presents lots of opportunities if you look. Often those come from exploration, experimentation, and making an effort to grow in some way. Having hobby software projects might be akin to writing music and creating new "beats." Learning from what others have done, studying their techniques and patterns can help us improve our own learning. The more I try to be creative, the more I understand that copying others is an important way to learn. From there I can start to adjust and alter the final product to be my own.
Study your craft, improve what you know and learn more. Practice and improve, and you might be surprised where your career can go. Plus, it's more interesting when you're engaged. Of course, as noted at the end, learn to take breaks, relax, and enjoy life outside of your work. Finding a balance there is important to ensure you work to live, not the other way around.