No surprise here, it’s in the Constitution. For a very good discussion as to why the Electoral College is an important means to preserve liberty and the federalist structure, read Fund and von Spakovsky’s Who’s Counting. Add the opposition of Al Gore to the list of reasons to keep the Constitution as-is.
It is easy for any state to amend its constitution to provide that electoral votes be apportioned by congressional district. That would solve the ‘all or nothing’ problem. Gore as usual is off-the-mark. No Federal involvement is needed. States can solve this. Or they can choose not to solve it.