Although I would love to have Canada become the 51st state (or states), I suspect POTUS was just trolling in order to do one thing - to instill a sense of nationalism in the Canadian middle class, on the fence voters.
Nationalism, populism. The antidote to globalist socialism.