Miller came up with a dumb idea. Knowledgeable people at DHS rejected it. WH tried to kill the outrage, but Trump likes outrage and only cares about the reaction (not the details) so he undermined his own people.
It's an empty threat that Trump views as leverage, but there are consequences to undermining your own people like that.