Apple borrows, Pfizer goes British—blame the US tax code

The U.S. tax code is a mess, creating perverse incentives for companies to borrow more than they should, invest less than they would like to and accumulate more cash than they need. If you are puzzled (or indignant) about why a company (Apple) with $150 billion in cash-in-hand would borrow $17 billion or what motivates a large US company (Pfizer) to try to acquire a UK-based company (Astra Zeneca) and then move its headquarters to London, you should blame those who write the tax laws, and not the companies in question.

Andrew Harrer | Bloomberg | Getty Images

You can write an entire thesis on what's wrong with the tax law, but let's focus on two of its most egregious corporate tax law features.

The first is that it rewards corporations for borrowing money, rather than using equity, by making interest expenses tax deductible but requiring payments to equity (dividends or buybacks) to come out of after-tax income. The second is that the U.S. corporations are required to pay the U.S. corporate tax rate on income that they generate in other parts of the world, though the tax has to be paid only when the income is brought back to the United States. The global taxation of U.S. corporate income has been a feature of US tax law for decades, but when it was written, the U.S. accounted for more than half of the global economy and U.S. corporations generated more than 90 percent of their revenues domestically.

Read MoreWhat Israel can teach the US about taxes

Today, the U.S. economy has shrunk relative to the rest of the world and U.S. companies generate almost 60 percent of their revenues overseas. At the same time, the U.S. statutory tax rate, at roughly 40 percent (with state and local taxes) is now among the highest in the world, and U.S. corporations, not surprisingly, are choosing to leave their income in foreign locales to avoid paying the differential taxes that they would have to pay, if they bring the income back to the U.S. This trapped cash, amounting to more than $1.5 trillion in 2013, cannot be used to pay dividends or buy back stock to investors or invested in projects in the U.S., but it can be used for investments overseas.

Both Apple and Pfizer generate significant portions of their income in foreign locales and both have left much of that income in those locales (to avoid the additional taxes due if they bring it back to the U.S.): more than $100 billion for Apple and about $40 billion for Pfizer.

As the Apple CEO, if you want to return more cash to your stockholders, here are your choices: You can bring the trapped cash home, pay $20 billion in taxes and use the remaining cash to pay dividends or buy back stock, or you can borrow $100 billion, which you will be able to, given your strong financial standing, create about $20 billion in additional value for stockholders from tax savings, and return that cash to stockholders.

Read MoreTechnology a job killer? Not for these companies: Carol Roth

As Pfizer's top manager, you can use some of your trapped cash to acquire a UK-based company and move your headquarters to London, which will un-trap the cash, since the UK has a more sensible territorial tax system, where corporations pay taxes in the countries that they generate their earnings.

Do you blame either company for the choices they made? In fact, my question with Apple would have been: Why they did not borrow more than $17 billion: And with Pfizer, it would be: Why did it take them so long to read the writing on the wall?

The Apple debt announcement was greeted with righteous indignation on the part of politicians and opinion leaders and I am sure that Pfizer's acquisition bid will attract the same type of populist backlash. After all of the sermonizing has subsided, perhaps they will wake up to the truth, which is that U.S. tax law, as written, is an invitation for other companies to do exactly what Apple and Pfizer have done: Borrow more, invest less in the U.S. and move their headquarters to other countries.

Read MoreThe best and worst states for taxpayers

There may be a consensus that the current tax code is an abomination, but attempts to rewrite the law run into two obstacles. The first is that there are those who profit from the complex tax laws of today and any attempt to rework it will run into fervent opposition from current beneficiaries. The second is that any politician who works on rewriting the law (as opposed to talking in generalities), will be subject to populist attacks from both sides of the political spectrum and labeled a corporate stooge.

If there is a politician who is courageous enough to take on this challenge, here is my advice. First, keep the new tax law simple since complexity is guaranteed to bring with it unintended (and bad) consequences. Second, remember that the tax code is first and foremost a revenue-generating device and not an instrument for social change or punishing bad behavior. Finally, good luck with your post-political life, since you will almost certainly not get re-elected!

Commentary by Aswath Damodaran, a professor at the Stern School of Business at NYU, where he teaches corporate finance and valuation. He also writes the "Musings on the Market" blog. Follow him on Twitter @AswathDamodaran.