The answer is, it is a Republic, not a Democracy. It's set up to make it difficult for the majority to trample on the rights of the minority. More colorfully, having two wolves and a sheep vote on what's for dinner.
People keep saying this (the republic vs direct democracy part), and it literally doesn't make any sense, to the point that I have difficulty believing people aren't being deliberately obtuse.
Having people directly elect their representatives is still very much a republic and in no definition I've ever seen considered direct democracy. We're talking about people electing their representatives, not their laws.
Yeah. The idea that our system somehow successfully prevents a majority from outright extreme oppression of a minority is laughable given our history. This is just a talking point made with nearly zero intellectual honesty to continue to support a system that benefits one political faction.
When they say "trample on the rights of the minority" they mean "enact legislation unpopular among conservatives."
It's still a good thing.