All recent (and not so recent) actions by Trump are best understood if we see that he has only two things in mind, winning and money. The tariff war - he wants to win. Problem with NATO - he wants to win. Sucking up to Putin - he wants to win against Mueller. Trump properties in D.C. and Florida - money makers by getting guests (foreign diplomats, etc.) to patronize. I'm sure others can think of more examples. Running for president was just to show he can win. Once elected he has no idea what his job is.
Those are not winning moves. He could win much more, and more easily, with backing from NATO and by giving Mueller less ammunition or means of gathering popular support. It also gained him the ability to bust out the Presidency in reasonable safety - a lucrative endeavor - while making Putin happy and willing to keep him around. The actual job was never involved.