>You should not be allowed to just arbitrarily decide which countries laws apply
It's a long-established principle that you should be able to decide, as part of a contract, how disputes relating to the contract should be resolved. That includes things like alternative dispute resolution (arbitration, clerical courts, spinning a bottle...) as well as a national jurisdiction.
However, this only applies to the two parties.
You can't arbitrarily decide how a third party (such as the government of the country in which the contract is effectively executed) should treat you. Google, Apple, et al, can shift their earnings around the globe because of international accounting regulations to which governments, including that of the UK, have subscribed. Partly, they did that because they hoped that by competing with each other to offer favourable tax treatment, they could get international companies to relocate and make up in volume what they were losing in margin by dropping rates.
Surprise, surprise, small countries which get the greatest proportional benefit from headquartering multinationals are able to offer the lowest rates.
Blame your politicians, not the companies they are actually encouraging to behave in this way.