I'm biased myself, having spent the last 20 years studying software dev and then working in software. I feel that while it is a lot of work, the market is quite hot for any technical talent, and making a decent living is straightforward. Even a shitty software dev likely makes a comfortable living, you don't have to be Jeff Dean. In CS you can graduate from MIT and probably be set for life, but in music you can graduate from Juliard or Berklee and likely still be living on a futon for decades. Or am I off here?
Whereas as a solo producer/composer (or someone in a band) it seems that getting anywhere near ramen profitability is really really hard. It's reminiscent of startups: you have to find your niche, you have to constantly stay relevant, you have to market yourself incessantly on every medium, and most likely you'll be drowned into obscurity by someone else who became a winner-take-all in that space. And while the payoff for founders in small to medium startups is still pretty decent (and can be life-changing), as an artist is seems like the polarization between starving and huge is even greater.
Even in photography you can always "sell out" and shoot weddings in perpetuity while you're doing more artistic work on the side. And that "main gig" pays reasonably well, even though it's exhausting. But with music things like playing gigs will likely not get you anywhere close to sustainability. Maybe teaching is the "weddings" of music?