This is how we got a Democrat rep in my district - far right nutjob won a primary against a moderate Republican incumbent, and then lost two general elections in a row. The Democrat we got kind of sucks, but even sucky democrats count towards a house majority.