I think the temptation is to assume that the president is at least of average intelligence. Unfortunately this leads to this strange apologist behaviour when he says something fricking stupid.
I don't think that Trump is stupid, I think he is completely handicapped by a massive case of narcissism rendering him incapable of seeing anyone else as his equal in any arena and taking any questioning as a personal insult. This is so complete in him that he thinks any idea that pops into his head is genius and expects everyone else to do the same as they are lessers. He also sees loyalty to him as the most important quality in any advisor. This leads to insane statements and total mismanagement of most things. This has also led to others recognizing this and understanding that they can personally profit from it by just going along with it. There are also true believers who follow him in much the same way cult leaders have always been able to convince people to do illogical things.