Because Tyrion was accused, in public, by the Queen Regent, of murdering the King. That’s way too high profile a case to be handled privately; the sheer lack of information would lead to wild rumors about conspiracies and plots, and whatever the outcome, there would be people who believed the worst simply because everything was done in private.
By contrast, while having a public trial is embarassing, it allows Tywin to get buy-in from House Tyrell and House Martell for the outcome, to shape the public’s narrative of the death of King Joffrey, to show that the government will uphold the law and punish lawbreakers, etc.