Quite often political leaders choose policy that is good politics rather than good policy (this tends to get them votes) - excessive protectionism and anti-foreign behavior is one example.
I've made the analogy where when my country imposed retaliatory tariffs as follows...
Trump (to my country): I'm mad at you, so I'm going to punch myself in the face.
My Prime Minster: oh yeah? Well now I'm mad at you, so I'm going to punch *myself* in the face.