That's not the only reason it's a terrible analogy; Musicians are artists, developers are tradespeople. If an interview method doesn't make sense for a carpenter or an electrician, it probably doesn't make sense for a developer. That being said, I don't think there are any good proxies for whether a hire will be a good fit, so I understand the problem employers are facing.
I agree that it is a bad analogy, but I think it goes far beyond supply and demand differences: Music is performed mostly by muscle memory, "system 1", while code is developed mostly by ratiocination, "system 2".
Supply of wannabe developers is quite high.
Isn't that the case in all skilled professions that pay well?
I don't think so. Development seems easy just like singing you can do it at home, have some results on your own computer. But look at talent shows, there are people who can sing and win but still do not have what it takes to build career after winning talent show. Secondly there is whole bunch of occupations that pay well like dentist but how do you even practice that without buying expensive tools.