Trump is rather obviously experiencing the onset of dementia, but he hasn't lost his ability to pander to some of the worst instincts (a portion of) the American people possess. As his mental state further decays, I suspect he will continue to fall back on this sort of inflammatory pandering, as he'll have even less idea what else to say. Old patterns of thought/behavior will emerge even more often as he loses the capacity to recognize (or care) that they are utterly inappropriate.