How the Electoral College and party loyalty helps Republicans win elections even when they oppose popular policies.