First, education is chock full of positive externalities, which will never be realized correctly. While "the economy" doesn't need underwater basket weaving - or art history, or literature - society still does. Even if people don't work in their field, the world is better for the increase in knowledge. Man does not live on engineering alone.
Second, the invisible hand can only do its work in a world where the effects of decisions are predictable. Given the long lead time on a choice of major affecting your income - at least four years, arguably more if you factor in choice of AP classes on high school - that's never going to be the case. Say this system had been in place in the 90s, and say you're okay with underwater basket weaving students getting the short end of the stick because, well, they signed up for it. Fine. But what do you say to the computer science class of 2001?