The US would impose a retaliatory tariff against another country if they were to attack US shipping during a time of war where the US was a neutral party or if the said country did something major violating a common right or disrespectful to the US as a whole and we would use the tariff to try to force them to fix the issue.