You are bringing up a few new issues here.
In regards to Apple, Tim Cook in his testimony to congress said:
>...The Company’s FY2012 total US federal cash effective tax rate was approximately 30.5%.1
>…Apple does not use tax gimmicks. Apple does not move its intellectual property into offshore tax havens and use it to sell products back into the US in order to avoid US tax; it does not use revolving loans from foreign subsidiaries to fund its domestic operations; it does not hold money on a Caribbean island; and it does not have a bank account in the Cayman Islands. Apple has substantial foreign cash because it sells the majority of its products outside the US. International operations accounted for 61% of Apple’s revenue last year and two-thirds of its revenue last quarter. These foreign earnings are taxed in the jurisdiction where they are earned (“foreign, post-tax income”).
https://www.apple.com/pr/pdf/Apple_Testimony_to_PSI.pdf
>...It doesn't matter where the company's headquarters are located.
If you are a US company, it does.
>...If Samsung has profitable operations in California it should be taxed on that activity at the same rate as any other Californian business.
It is. The difference is that Samsung subsidiaries that make a profit in Germany don't have to South Korea corporate tax when they want to invest in South Korea. In fact, the US is the ONLY country (other than Eritrea) that does this - every other country has figured out that this discourages bringing investment capital back to the home country. The guy who posted the original snarky post about just taxing all the worldwide income of a US corp didn't try to defend it when people posted some of the more obvious consequences. US companies need a level playing field against the companies from other countries
>...That leads to another point - there are plenty of Californian businesses which cannot use the same accounting tricks that Apple uses.
I think you are referring to how some of the big corps essentially pay no US corporate tax. A number of economists have said a much better system would be a revenue neutral system where you remove the corporate tax and increase taxes on capital gains and dividends as that is much easier to tax and corporate taxes tend to hurt the workers in a company and hurt the consumer by increasing prices. But that is a different issue.
>...Running a business in California is like growing crops in a particularly fertile field. You get a great yield, but you should also pay high rent.
CA has unique strengths and weaknesses for a business. There are smart people all over the world so there is no absolute guarantee that CA will do as well 40 years from now as it has done over the 40 years, but that again is a different issue and worthy of its own discussion.