PS: What side projects do provide is a way to have more experience than your number of years in the field would suggest. But, that has heavy diminishing returns.
In addition, there is a real danger early in a developer's career that their resume becomes a signal of being a weak developer if they don't put in the effort to progress - I have seen this happen to multiple developers who did not take seriously the need to reach a certain level.
Now to tackle the analogy directly, there is a lot of competition for positions in the music world - musicians have to work pretty hard to get stable jobs, or carve out positions of prestige. The most successful musicians I know do it very often, whether it be arranging songs, practicing their musicianship, and immersing themselves in as many musical communities as possible.
But I read all sorts of technology and programming stuff just because I’m interested in it. And that knowledge ends up coming in very useful.
I’d rather have someone like me than someone who does their coding at work but never reads anything that they weren’t assigned to by their job.
To use your analogy, would you want to musician who worked 9 to 5 but never listened to any music outside of their job?