With gerrymandering, the ruling party will pack voters in districts by party. Instead of competitive districts, one party districts are formed, and more extreme candidates win primaries. That's how you end up with really objectionable people being elected instead of centrists, and compromise becomes near impossible.