But we're not comparing country averages, we're comparing the highly paid spots only. The same multinational company e.g. Google will pay you much less in Switzerland than they would in California.
I don't know where you're getting your info from, but Google salaries in Switzerland are extremely competitive with California. The average for software engineers at Google Zürich is around $300K at L5 I'd say. And the housing situation, while still very expensive, is a lot less fucked up than San Francisco.
Source: I'm a Googler in Zürich. Current total comp is at $320K after 3 years at L5.