If unnecessary government borrowing (deficit spending) and high tariffs are both harmful to the economy, why do governments in democracies often adopt such economic policies?

The effect of those practices on the economy are debated
Governments often use tarrifs to protect local industries from more competitive foreign suppliers.
Governments often use deficit spending to stimulate the economy during a recession.