The US banned using foreign coins in the mid 19th century as a misguided attempt to bolster patriotism. Americans routinely used Spanish coins in private transactions up until this point. I think (don't entirely remember if) part of the reason was to encourage the use of US silver coins which had been driven out of circulation due to the US government overvaluing gold relative to silver. The basic problem was that by having the US dollar fixed to two exchange rates that one was always being driven out of circulation as the exchange rate changed. This lead to the free silver movement and the Populists getting excited about seeing only silver used to back dollars.
This is a misguided attempt to trap people into their own crappy currency. The US currency isn't any better fundamentally but as of now we don't force citizens to hold dollars for savings.