Bilateral Social Tax Treaties
Western Europe is covered by a mesh of bilateral agreements that govern the payment of social taxes. As far as I can see, this mesh is complete and all EU and EEA countries are covered as is Switzerland.
Individual agreements may differ but in general the deal is as follows.
If you are working as an employee for a company in one country but you perform your duties in a second country then you may opt to pay social taxes in the country of your employer rather than in the country in which you work.
Why is this allowed?
The main reason is that it would often be unfair to an expatriate worker to make him pay social tax in the country in which he was working for a limited period of time.
For example, suppose that a Briton was to work for two years in Germany and there paid German social taxes. The person would get very few benefits from paying these and, even if they did, the cost of providing the benefits would be disproportionately high.
Do the Germans really want the trouble of paying a tiny pension to a retired person who worked there for eighteen months thirty years earlier? Suppose that this worker had become unemployed at the end of the eighteen months, would the Germans have been interested in paying him social benefits? More likely they would have been interested in expelling him from the country!
The possibility here exists for a degree at least of designer taxation. A contract worker from, say, the UK who has a job in Germany may opt to work for a Swiss umbrella company and thus pay substantially lower social taxes. This will not entitle the worker to many benefits and it will be necessary to take out insurance to cover ill health and to build up some savings to cover periods out of work. However, the overall cost is substantially lower and it is a popular option.
Of course, another aspect is that a country with very high social taxes may reason that the opportunity exists to make money from foreign workers in order to prop up the social tax system. A good example is Belgium. Although they have signed social tax agreements with most other European countries, they refuse to homour them and also they systematically deny benefits to foreigners.
If you work in Belgium and pay their social taxes then, if you lose your job you will be expelled. If you try to claim for example, child benefit, you will be obstructed and if you ask about your pension, you will be laughed at.
The Belgian government recently lost a case in the European courts. This case was brought on behalf of a group of British opera singers who had been refused the possibility to use the social tax agreement with the UK in order to pay British National Insurance and not Belgian social tax. The Belgians were forced to return the social taxes to the singers.