And I get that. I have hobby projects because it's nice just to go wild and code for my own entertainment. My home lighting system is a custom Scala actor-model daemon, because 5 years ago I thought Scala was cool. (In retrospect: nope!) Building things is fun.
But when I'm on the clock, I've learned to be relentless in understanding actual users and their needs, and ruthless in pruning back the many things I'd like to build down to what actually serves people.
That's not easy even in the best of cases. And in companies that have waterfall-ish leanings or command-and-control managers, it's often impossible. So a lot of programmers learn to build whatever they're told, regardless of whether it solves a problem. And a good chunk will do it in ways that entertain them, because when managers drain all meaning out of a job, we are forced to find ways to create some for ourselves.