Attacking YOUR voters is indeed unwise. Especially when a great many of them are indeed “deplorable”, as they are racists, bigots and general haters. But if you need them behind you to have any hope at all of being elected, you pretty much have to own them no matter how deplorable they are.
Not a good position to be in. But they did get Trump the nomination.