Consider also that in the US, corporations have an outsized influence on the law. In your example, Corporation B may not only be taking advantage of incentives in the tax code, but it may have had a hand in creating them as well.