It's not intending to do something legal, it's intending to do something illegal: Stealing their likeness. The fact you used an otherwise legal procedure to do the illegal activity doesn't make it less illegal.
How can something be illegal if every step towards the objective is legal?
This would result in an incoherent legal system where selective prosecution/corruption is trivial.
What's illegal, in general, is not the action itself but the intent to do an action and the steps taken in furtherance of that intent.
Hiring someone with a voice you want isn't illegal; hiring someone with a voice you want because it is similar to a voice that someone expressly denied you permission to use is illegal.
Actually, it's so foundational to the common law legal system that there's a specialized Latin term to represent the concept: mens rea (literally 'guilty mind').
It is legal to buy a gun, and legal to fire a gun, and it can even be legal to fire a gun at someone who is threatening to kill you in the moment, but if you fire a gun at someone with the intention of killing someone that happens to be very, very illegal.
So? You're merely (correctly) pointing out that the acts have consequences that are of wildly differing severity. Not that one is a legal and the other is not.