Earlier quoted context omitted.
Only if living in tier 1 countries, I can assure you there are countries where both professions have equal chances of success, and probably the musicians get the upper hand on opportunities. In many of such places you will probably live better from tourist tips than trying to make it as programmer.
That's no longer true in these days of working remotely.
It starts by living on a country whose technology infrastructure makes it possible at all.
Then it follows on how much the tier 1 customers are willing to pay to their offshored devs, with the race to the bottom on the dollar per hour rate.
There is also the culture of the country, if programming is seen as a servant job only used as stepping stone for a real job, or if it is seen as master of universe Silicon Valley style.
Working as software developer is privilege, not seen through the same lens across the world.