As others have said, the 'offside' goal is, ultimately, legitimate. What's frustrating (for me) is that so much of the discussion has centred on the defender's deliberate play, which, in what can often be a very murky world of Deliberate vs Deflection, is about as Deliberate as we will ever get!!!
The part of the decision that's a bit more interesting and leads to a valid discussion is the impact that the attacker has had on the defender's choices. The 'obvious action' by the attacker (running towards the defender) absolutely impacted the options available to the defender, leading to the ill fated choice to attempt a pass to the GK. But it's not deemed to be an offence as it's not impacted the defender's actual ability to play the ball just his ability to play the ball in an unconstrained fashion.
At the risk of a tangent, the parallel I would draw is with an attacker standing 4-5m in front of a GK hoping to punt the ball upfield but with other 'short' options available. Is the attacker actually "preventing the release of the ball" or just limiting the options available to the GK?