Is Assange really the hero everyone is making him out to be? Yes, Wikileaks did help expose Hillary during the election, but who was it that gave him the information? Who was SR really? Who was Bradley Manning Really? Who was Edward Snowden really? Even after all this time, we really don't know for sure.
Some of the prior WikiLeaks were quite damaging and even seemed completely thoughtless, or maybe they just lacked any real consideration for what harm might occur to innocent people. Maybe some of the information dropped by WikiLeaks was intended to cause harm in ways most people didn't really understand. Like Edward Snowden's leaks. Maybe (likely) Assange was just being used in some cases.
The path to Hell is paved with good intentions. Pride goeth before the fall, etc. These truisms definitely apply here. Perhaps his seclusion in the embassy can be thought of as Assange paying some sort of penance for previous harm he caused, either knowingly or unknowingly.
Did Q cut a deal with Assange long ago? Perhaps the deal involved using Wikileaks (an outlet trusted by many) so that more attention would be given to the DNC/Clinton wrongdoing. For that, the penalties for his actions could be reduced, he could be given protection, his life might be saved.
And it gave Assange a means to make amends for real damage he might have done–some having consequences we might not even be aware of. Personally, I don't think Assange ever realized how coordinated the corruption present in the world really has been, how it has been masked behind governments, religions, other institutions, or who have been its ultimate perpetrators. I bet he has a better sense of how the world really works now.