Tariffs are not mainly designed to generate revenue but to protect economies. The cost of tariffs is always passed on to the consumer/client so the assertion that tariffs will "tax" anything but the consumers/companies of the country implementing them is laughable. When the use of tariffs leads to a trade war, the primary and immediate victims are always the consumers.
That being said, when correctly and rationally used tariffs are a good way to level the playing field. Sometimes, foreign made products benefit from a lower cost of labor, more lax regulatory frameworks or even subsidies that put locally made products at an unfair disadvantage and the best way to correct that is through tariffs. Also, sometimes there are economic activities that suffer from a lack of competitivity but that need to be protected because of their strategic importance. For example, a country may need to protect its agricultural production to avoid becoming dependent on foreign actors for its food supply. That's the reason why the biggest challenge in free trade agreements negotiation is always to agree on the goods that would be excluded from the scope of the FTA.
I personally think that the smartest way to use tariffs is not to impose them but to threaten with imposing them in order to negotiate.