So direct democracy then? That presents it's own problems like the majority being in favor of something horrible, like the internment of muslim citizens after a terrorist attack.
That's a misrepresentation of what direct democracy is. You're still bound by a framework of statutory and common law, along with oversight from the various branches of government. It's not mob rule.
Not to mention unjust internment already occurred despite representative democracy (in fact directly emanating from elected executive power), that of Italians, Germans and Japanese during WWII. Let's also not discount land law acts and a host of other attacks on civil liberties.
The essence of a representative republic is that these horrible leaders would still be checked by the minority of non-horrible leaders.
In a direct democracy, the mob only needs 51% of the referendum. In representative government, a minority of representatives can prevent disastrous legislation from happening, through the threat of filibuster or by holding a more valuable (to the opposition) bill hostage.
In 2009 when Democrats held a Congressional majority, they didn't get everything they wanted. Now in 2015, Republicans hold a Congressional majority, they still don't get everything they wanted. Whichever side you're on, you must admit that these checks prevented the "bad guys" from prevailing.