Doing that occasionally between projects, or regularly on your own time (a.k.a. sharpening your saw) is essential to improving as a programmer
But in the context of programming as a job (which is the topic of the post), if one repeatedly spends hours solving already solved problems simply because "one enjoys it", it's a waste of the team's time.
[using old-fashioned "one" here instead of "you" not to make it personal]
I'm glad I finally saw someone say this. It seems like we're a dying breed: those of us who got into CS for the sheer enjoyment of solving problems. Making fancy things happen on the screen is simply a positive side effect for us. I abhor that development these days is 90% Googling shit and 10% actual creativity. I go out of my way to keep my day job interesting.