I’m just speculating here, and time will tell, of course, but perhaps Trump is coming out swinging against historic allies for two possible objectives:
1. Nations hostile to the US will see is and think, “If this is how he treats his allies, what might he do to us?!” Not that they would ever admit it.
2. Allies will think, “I think we might be more on our own with this guy in charge of the US. Perhaps we DO need to allot more towards our military strength.”
And, of course, the never out of fashion TDS reason:
3. He’s just a fvcking idiot!