Neither of those are the Constitution, the EC was designed so the public had no say in choosing a president because rich white dudes know best. It has basically never been used for its designed purpose.
It's from the federalist papers... promoting the constitution. They're elaborating on why the EC is the way it is, according to the constitution, as they designed it.
It's not designed so that they just ignore the popular vote every time -- it's designed to prevent extreme cases that put the republic in danger.