Twice it was a US based company (San Francisco), who are used to SF salaries, and found out the the "same quality" engineers in Germany can be hired for much cheaper (cost of living much cheaper etc.). So for both sides, its a win-win. I see many more companies doing this. It's not really good for the local economy, since you leverage the (back then) super liquid SF bay area market from within Germany.
They usually have a European/German office for the paper work, just pay much better but have to obviously comply to German labour laws. I am happy this works so well so far, but don't count on it being like this forever.
From what I heard from these two companies, that they stopped hiring SF engineers (because too expensive) and looked for other places in the US with the same timezone.