Actually, the electoral college is under no obligation to vote for the candidate of the party on whose platform they got elected. If they had wanted to they could have voted based on the results of the popular vote and elected Hilary Clinton. That's how the electoral college works. They may have cast their votes according to which party they represented, but it was not incumbent for them to do so. It was "designed that way" to ensure at the time that the constitution was written, that the northern states, which had a larger population, did not dominate over the southern states, which they would have if there had there been a direct vote. Since slaves could not vote, by using an electoral college, the south was able to count them as part of their population base (albeit at a rate of 2/3 of a person) and increase their number of electoral college votes. It's an antiquated system that does not reflect the reality of American politics today.