It’s a bad design, but it is working as intended by the people who fought against establishing a true democracy in the US originally.
The electoral system and gerrymandering make it so a two party solution is the only real system that works; and one of those parties will always be moving away from the other, while the other has to move closer to the middle every time to “recapture” the voters who also shifted further from center.
It’s a bad system, and it needs an overhaul/update desperately. Other countries that have established democratic systems of government since the US was established (and is technically, on record, the “oldest” democracy. If you squint.) have superior constitutions and systems of government that ensure free and fair electoral practices where candidates don’t have to appeal to moderates because even edge case parties are still represented in their house of representatives.