I think what happened was, Trump announced those tariffs, saw the consequences and had to stop the tariffs. But he couldn't just stop the tariffs like that they had to meet those countries and agree on some excuse for stopping the tariffs.
Those countries were happy to provide an excuse to because the tariffs had consequences for them too. So all parties just agreed to come up with this sending troops to the border thing and now Trump wouldn't look like a fool.