Trump will say anything and do whatever he decides is in his own best interests. Every time the media reports him saying some stupid shit, he gets media coverage, which gets him more support from morons.
He'll keep spouting shit as long as it keeps getting reported and amplified.
So this is essentially when you’re eating and the dog starts barking so you give him some food to quiet down. All you’re really doing is training the dog to bark when you eat.