No, it is NOT legal if you did not specifically agree to it in advance--while a customer can pay for a contractor's insurance, that must be part of the agreement or contract between them. Furthermore, even if it had been part of the contract, if he violated the contract by not doing the work--as is what happened here--you would still be entitled to all your money back: he cannot fail to do the job but keep part of your money. If he will not return the $1,500, you could sue him (such as in small claims court, as your own attorney or "pro se") for it.