This week the big medical device company Medtronic said it was moving its legal headquarters from Minneapolis to Ireland. It's part of a $43 billion merger with another medical company, Dublin-based Covidien.

The move is a tax-saving strategy called an inversion and it's growing more common in the corporate world.

U.S. companies make huge amounts of money overseas every year and much of it stays there, stashed away in foreign accounts.

"They have billions and billions of dollars offshore and they're generating billions and billions more each year," says Martin Sullivan, chief economist at the nonprofit firm Tax Analysts.

He says the problem is a quirk in the tax code. American companies can make all the money they want overseas, but once they bring the money back home they have to pay U.S. taxes. And the official U.S. corporate tax rate, before deductions and exemptions, is high compared with other industrialized countries.

"We've created this crazy system where instead of taxing profits when they are earned we only tax them when they are brought back home," Sullivan says. "Therefore, there's a tremendous disincentive to bring the money back home."

Much of the money ends up sitting for years in foreign bank accounts, often in tax havens such as the Cayman Islands, says Edward Kleinbard, a law professor at the University of Southern California and author of We Are Better Than This, a book about government spending.

"It should drive American taxpayers crazy that firms are generating large amounts of income — extraordinary amounts of income — in jurisdictions where in fact they're not doing any business," Kleinbard says.

With an inversion, a U.S. firm merges with a foreign company.

It can keep most of its operations in the United States. But legally it becomes a foreign company too, which means it can bring money back to the U.S. and pay lower taxes on it. The merger of Medtronic and Covidien is the biggest inversion so far. Medtronic Chairman Omar Ishrak said this week that the deal isn't just about cutting taxes — it makes business sense.

"Sure there's more cash flexibility and we'll use that to our advantage, but the strategic element of this deal is extremely important," he said.

Inversions are still rare — about 20 in the past two years. But their numbers are growing fast.

"I think we are going to see more of them with the current very complicated tax system that we have, and the ability to maneuver through that tax system is going to provide opportunities for doing inversion deals and others," Deputy Treasury Secretary Sarah Bloom Raskin told The Wall Street Journal this week.

And there's a growing sense that Congress needs to address the issue. Many Republicans argue that companies are forced to pursue tax-saving strategies like inversions because the official U.S. corporate tax rate is too high.

Senate Finance Committee Chairman Ron Wyden, an Oregon Democrat, argues that inversions need to be addressed as part of an overall tax reform bill — one that would lower the corporate tax rate but also strip away some of the deductions and waivers that now lard the system.

But Kleinbard, the law professor, says that's not likely to happen anytime soon. "Congress is so fractious these days, it's so dysfunctional, that even an issue as important as this and that to which there is a surprising amount of consensus can't get done," he says.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.