Looking through Article 1, Section 8 of the U.S. Constitution (that part of the document that enumerates the powers of the Congress), there is nothing that talks about Congress' role in education. Traditionally, this has been one of those powers left to the states. And yet, there is a federal Department of Education, overseeing the funding of schools and contributing money towards it. How was it that Congress was able to create such an agency without running afoul of the Supreme Court and implied powers reserved to the states?
The Department of Education was created in 1979 by then President Jimmy Carter. However, the function of overseeing education policy within the country has had some vestige at the federal level since 1867. For the bulk of its existence, until 1979, it existed below the Cabinet level as a office in the Department of the Interior.
Proponents of its creation argued at the time that Congress had authority under the Taxing and Spending Clause and Commerce Clause of the Constitution to create an education agency at the federal level.
The text of the Taxing and Spending Clause reads as follows:
The Congress shall have Power To lay and collect Taxes, Duties, Imposts and Excises, to pay the Debts and provide for the common Defence and general Welfare of the United States; but all Duties, Imposts and Excises shall be uniform throughout the United States;
The key piece being the reference to the "general Welfare" being the justification necessitating the laying of taxes in the first place. More famously, this language also exists in the preamble to the Constitution, saying:
We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defense, promote the general Welfare
In the view of the bill's supporters, the cause of general welfare for the population at large is advanced by educating the populace and preparing them for productive involvement in society upon graduation from school. This sentiment is mentioned specifically in the 1979 bill establishing the department:
The Congress declares that the establishment of a Department of Education is in the public interest, will promote the general welfare of the United States, will help ensure that education issues receive proper treatment at the Federal level, and will enable the Federal Government to coordinate its education activities more effectively.
Therefore, the argument went:
Congress has the right to promote the general welfare
Congress can fund that effort through the laying of taxes
Effective education of the population promotes individual welfare and is a boon to the economy at large
Effective education of the population is best managed by a centralized department
Therefore, Congress can create a Department of Education.
A second argument was made justifying Congress' action under the Commerce Clause, which as currently interpreted by the Supreme Court is arguably Congress' broadest authority. The Commerce Clause says that Congress has the power to regulate anything that will have an impact on the nation's economy as a whole. That is:
To regulate Commerce with foreign Nations, and among the several States, and with the Indian tribes;
Here the argument went that because an educated populace is more capable of producing quality goods for sale internationally, and taxing domestically, commerce is effected and can be advanced through federal action.
Opponents, chiefly the members of the Republican Party in Congress in 1979, found this justification to be troubling. Congress they argued was limited to promoting the general welfare through only those powers enumerated in the Constitution's text itself and any remaining efforts fell to the states or individuals through the 10th Amendment which said:
The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people.
Additional concerns about the fourth premise were also raised (i.e. "is the federal government really more efficient at managing such efforts"), but arguments about the effectiveness of the department are really ancillary to the justification for its existence in the first place.
The same way they claim legitimate authority to exercise power over everything else under the sun.
They happened to have hand picked the only people who could practically stop them.
Beyond that the "legal" arguments really don't matter. Anyone who believes the 13 states in 1787 would have approved giving congress such effectively unlimited power over them is kidding themselves.