I suspect this is what many of us do (based on my own behavior and what I observe of others), but I'm not sure we outright say it or embrace it. Mood Driven Development: Work on what you feel like working on.
I should say: there is some inherent luxury to this. A lot of people don't have jobs where you can do whatever you want whenever you want. Or have any flexibility at all.
But what is highly prized in our industry is productivity, in whatever form it takes.
"Hey, I refactored some of our mixins to be more efficient and made sure they are used properly site-wide."
"Good morning, I looked over a lot of the copy around the site and have some ideas on what we can change to make it more clear and cohesive."
"This afternoon I closed out a couple of long-standing bugs that have been bothering me."
Any place I've ever worked, any of these things would have been applauded. Especially if they relate to the current team/project at hand. That's what productivity is.
That's too bad, since you are being productive anyway. You're following your mood.
I mention this, because I suspect that working on what matches your mood makes you far more productive and excited. If you're fighting against your mood, you're slower, more mistake-prone, and fueling burnout.
I also suspect that the mood to work on certains things balances out. Those things I really need to do? The mood to do them will come along. Perhaps even sooner if I'm not forcing myself to do them.
If your mood is: play video games all day. Then you're probably already burned out or in the wrong job.
I can't vouch for any particular employee embracing this way of working. Perhaps your manager will get pissy with you if you did some seemingly-random thing rather than what they envisioned you working on. I hope not, though. As working your mood is probably best for the both of you.