Having done a bit of research, i found a few things to explain the phenomenon.
- Companies like these are in demand of profile that are scarce resource on the market and are willing to acquire the best of them at any cost. In order to do so, they aggressively market their open positions, salaries and supposed employee happiness. This is especially true for Google and Facebook, might be less so for others.
- Many employees then realize things aren't so bright than advertised. The salary might be good, but their input is not valued as much as promised, they have trouble changing things, or find themselves unchallenged. There are management issues, and issues related to the fact the company they work being too big to provide key roles to everyone.
- Being highly qualified and on demand, employees can find other opportunities at any time, and are targets of aggressive job marketing from other companies as well.
Another factor is that since tech giants also serve as a selling point on one's CV, they might as well hire people already planning a limited experience to improve their career perspectives, but I found little evidence supporting that it'd be a massive factor.
So I came to the conclusion that the high turnover is the result part of the market being tense, part of the management (e.g. being too greedy for high profiles and then being unable to challenge them), and part of the company size, factors that are fairly hard to fight.
Regarding costs, the answer would be then the costs are left partly unmanaged because of how difficult it is to address the root causes of these departures. Being well established, the companies simply pay it with the return of past investments.