It comes from a very old, right-wing, oligarchic structure, it is extremely conservative and influenced by tradition, and this characteristics survived all the progressist attempts of change. The Brazilian Supreme Court has been largely criticized and even convicted by international Courts for disgusting RECENT decisions (such as absolving a man from the accusation of rape because his 13 year old victim was a "prostitute", and their rule in favor of the the legality of self-imposed amnesty as a way to grant impunity).
The mensalão started much, much before members from the Workers Party became involved, and was created by the current opposition. None of the intellectual authors of the mensalão have been condemned. And some of the worker's party members were, in fact, found guilty without any evidences. Dirceu, for example, was convicted because he was "in a position of power" (as no proofs were presented that he even know about the scheme), with basis in an theory the Justices imported from German law, the "theory of the domain of the fact" - that had never been used in Brazil before. Worse, the jurist that created the concept said that the application of it in mensalão was completely wrong.
The Supreme Court is acting as an actor of the political game, favoring the opposition. As in 1964, many of them think that enough is enough.