There are a lot more jobs for programmers than musicians, at higher median pay (but a lower mean, because the pay for musicians is much more concentrated in a small cadre of very high earners.)
I'm pretty surprised that software doesn't run into the mean skew. I guess you stop calling yourself a programmer when you're a CTO/CEO of your tech company you founded.
The distinction is that working on your "art" is a direct pathway to thousands of salaried jobs with benefits. If you are a reasonably strong programmer and software engineer, you have to actively choose not to accept one of those jobs to struggle. It is not comparable at all to the struggles of someone in the fine arts.
The difference is that a bottom 20% developer can make 6 figures after a few years of experience, while even a top 10% musician can barely make rent in a major city