What Is The Jones Act For?

The right-wing has been on a tear lately ripping the Obama administration for its mythical failure to grant waivers of the Jones Act and allow foreign ships to help out with the Gulf oil spill. McClatchy debunked this meme decisively recently, and Pat Garofalo points to a CNBC host calling out Hans Bader of the Competitive Enterprise Institute for pushing this nonsense:

Still, even though the Jones Act has played no role in the spill, the question still remains: What is the Jones Act for? If there’s some genuine problem with foreign ships operating in US coastal waters, then why would we waive the Act when faced with a bad spill? Alternatively, if there’s no problem then why not repeal it?