That's not exactly true, at least not in Indiana.The do not select the electors for the purpose of selecting a specific candidate. The two elections are completely separated. Meaning, the people of a state do not select an elector that promises to support Trump or Hillary. Therefore, they are not selecting electors to choose the candidate they prefer.
The electors are slated by party, then elected. Republicans will generally prefer the Republican candidate (or this year, at least detest the Democrat). I do believe other states have other mechanisms.
But, it is not accurate to say that the EC delegates are not elected for the purpose of selecting a specific candidate. The expectation is that if the candidate of their party wins, they will support that candidate. That is the expectation.