Electors weren’t bound to a candidate. The founding fathers wanted democracy but were worried about “well-meaning but uninformed people” who may be vulnerable to charismatic populists, candidates with blatantly unfit characters, and influence by foreign propaganda. Electors were meant to be well-informed, exercise their judgment and prevent unfit candidates from being elected. That didn’t work in practice, and eventually states passed laws to pick partisan electors via popular vote. Then that gate keeping power shifted to party insiders, who chose the nominee and were meant to gatekeep bad/insane candidates. Then populists took that away too, because “people power” can never go wrong, right?
The current system, where you can vote in primaries, and where electors reflect their states’ vote, is just a few decades old.
Penalties for “faithless electors” are somewhat recent and only exist in states which passed laws to give themselves that power.