You can pretty much easily test if you have enough knowledge to be a good accountant or if you can play the violin well. There are couple smaller issues. Having knowledge will not tell you if they are hard working a knowing how to play violin well will not tell you if they will do well with orchestra and large audience. But in general you can do a testing period and be done with it.
With developers... the main issue is that it is super difficult to judge how good a developer is and that is IMO mostly because there is a huge delay between making a decision and suffering consequences of the decision and then it is frequently difficult to tell how the consequences are connected to the decisions and what were the alternatives.
And a lot of it is just opinions, so even if you hire a better developer you get into territory of trying to figure out whose opinion is right (probably the higher paid one? maybe?)
And so when I hire developers I am trying to look at various other things that I hope are proxies for what I really need. So maybe I will try to look whether they have good judgement in general, how they dealt with difficult situations in the past. Maybe get to know them a little bit as a person.
Which you don't have to do with an accountant or violinist.