I don't really like it either, but there's a rationale for rape trials to be secret. One of the biggest reasons rape victims don't press charges is because they don't want to face the enormous public scrutiny into their personal lives that always comes with a rape trial. At least in America, the most common legal defense against rape is to attack the victim's credibility and publicly brand her a slut. It's emotional blackmail but it works, which is why most rapes go completely unreported and why Kobe Bryant, for instance, is still a free man.
If Assange was going to be framed by the authorities, it wouldn't be in Sweden of all places, and it would be for something like tax evasion, not rape. It's way easier to go after troublesome public figures on tax charges.