If a product is cheaply produced in another country, and your domestic industry cannot match that price, your domestic industry might disappear. Suppose that other country is subsidizing their industry, then it's quite unfair, and it legitimizes supporting your own industry either by your own subsidies or retaliatory tariffs. As they say, to level the playing field.
If the domestic industry is already dead, tariffs won't magically resurrect it. For example, building a chip industry can take billions of dollars in investments and years of development. All that time, those taxes are basically just costing consumers money. They need to be kept in place up until the new factories come online AND are paid off. This can take decades. Will those tariffs still be there? Will those other countries have ALSO invested? Those uncertainties make it hard to invest in a dead/dying industry, even with tariffs in place.
One feature of tariffs is that it's a tax on consumption, so it's ultimately paid by consumers, and it's a regressive tax; the wealthiest will pay the smallest ratio of their income and/or wealth, while the working Joe will just see stuff getting more expensive - especially in the short term.
Tariffs can work to retaliate against, and discourage, dumping. They can play a role in protecting vital industries. But arbitrarily imposing them for political points is a dangerous gambit.