In a very messed up way he ran as a populist. I never understood why that word gets such warm feeling from those on the left. More often than not history has shown that politicians running as populists are horrific for the people they serve/rule over.
His base is "ordinary people". It's a group who believes we should withdraw from the world stage and only take care of things at home. They can't point to Syria on a map. They can't point to Iraq on a map. They don't see the connections or have empathy outside of the United States. This is Trumps populist image coming though. It also knocks some of the absolutely horrible news off the front page. He just doesn't think two steps ahead and didn't realize this would also generate news that is negative.
I think Trump saw this as a win all the way around. He has to have help from Russia to win another election. He also has to continue to pay them back for the last election. And don't forget, when he is out of the WH, he is going to need some money in order to make payments on his enormous debt all while continuing his lifestyle. Much of that over the last ten years has come in the form of loans from Russian outlets. It's his revolving line of credit. It also panders to his base as stated above. Like many populists, he knows his base is borderline isolationists.
Guy is just an idiot but these are some of the ways he can come up with such foolishness. Maybe I'm just dumb enough to think at his level.