short answer: because they can.
longer answer: The purpose of government is the redistribution of wealth created by subjects of the government to employees of the government. Because of this extraction of wealth the economic power of the subjects decreases in proportion to the extracted wealth and in relation the economic power of companies not subject to the taxing government increases. So the higher the internal taxation (like income tax, sales tax, etc.) the greater the foreign competition. Since the foreign competition is not taxed by the government in question the government would experience a decline in tax income and therefore uses import taxes to set off the differences in economic power between domestic and foreign producers.
This is another example of a government "solving" a problem they created to begin with. The result of course is that consumers are forced to purchase at higher prices than in a free market and thus loose wealth. This in turn is the mechanism behind the fact that any kind of taxation no matter who is being taxed ultimately will be paid by the poorest participants of the market. Which in turn decreases their chances of saving capital and becoming middle class. Which in turn creates and solidifies an uneducated lower class who demand further redistributions of wealth because they don't know better. Which of course is the ultimate goal of government: To create a lower class who do slave labor for the government out of their own choosing. Taxation in general and import taxation in special is a means towards this goal.
So that cheap/inexpensive foreign made goods don't undercut/undersell domestically manufatured/produced goods.
they are allowed to tax imports
No, the President of the USA does not have the Constitutional power to impose any tax. That is a power of the legislative branch of the government.
Tariff
the federal government is authorized to tax imports and exports
One of the purposes that may make the congress to impose a tax is to increase the revenue of the government. When the revenue is increased, the federal government is able to provide the basic services to its citizens.
the government may not impose a tax on church services.
The US government may tax imported goods through a tax system called tariffs. US states have no authority over tariffs..
In Australia exports overseas are covered by the federal government.
Alaska does not have a state sales tax or personal income tax. However, some local government bodies in Alaska do impose a sales tax.
duty tax
States cannot form alliances with foreign governments, declare war, coin money, or impose duties on imports or exports.
A type of tax charged on imports