Reading the comments, many people seem unaware that Assange was indeed interviewed by Swedish prosecutors in London [1]. And before that, for years, Assange gave them that offer, but they refused time and time again (until they reluctantly accepted) [2]. As @belorn noted [3], the prosecutors had 3 options, and given it seems like they didn't have enough to make a case or a plan to continue the investigation, it had t…
That's valid if Sweden locked him in the Ecuador Embassy. He went there to shield himself.
Personally I think (my opinion, anyway) that the rape charges were work of the CIA, but that's another story.