The government of country X subsidises widget production by giving its taxpayers' money to Widgeprod Inc. Its taxpayers are the losers.
Widgeprod then sells its subsidised widgets in country Y, which makes them good value to those who can buy them. Widgeproduits SA is threatened with the loss of most of its business and persuades the its own government to put a tariff on everything from country X.
This keeps Widgeproduits AS in business but everyone else in country Y paying through the nose for all imports from country Y.
The alternatives would have been for Widgproduits AS to side-step the competition by making something else (these situations rarely develop overnight) or cease production. The money customers save on the cheaper Widgeprod goods is spent elsewhere into the economy of country Y, and the foreign exchange that flows into country X is ultimately spent in country Y.
The subsidy is a net economic loss to country X. The punitive tariffs are a loss to country Y. Why does this idea of mutual self-harm persist?