The Declaration of Independence is listed in the first volume of the U.S. Code under the heading Organic Laws of the United States; Volume 18 of the Revised Statutes of the United States as enacted by the 43rd Congress (A.D. 1873-1875) and published by the Government Printing Office in A.D. 1878. (Note that Volume 18 reflects the law as it was known to exist after the 14th Amendment was (allegedly) ratified in A.D. 1868.)
"Organic" is defined as "of, relating to, or constituting the law by which a government or organization exists." Note use of the word "law" in the definition. There are four laws known as the Organic Laws of the U.S. They are the Declaration of Independence, the Articles of Confederation, the Northwest Ordinance of 1787, and the Constitution. Further, the Supreme Court has held that the oath that elected officials take to defend the Constitution inherently implies all the Organic Law, which includes the Declaration. Further, any reading of the Declaration shows that it was very much a legal document, beginning with the phrase, "IN CONGRESS, July 4, 1776. The unanimous Declaration of the thirteen united States of America," and closing with "We, therefore, the Representatives of the united States of America, in General Congress, Assembled," etc.
In that Volume 18, the Congress published a section entitled “The Organic Laws of The United States of America”. That section includes four documents:
1) The Declaration of Independence;
2) The Article of Confederation;
3) The Northwest Ordinance; and,
4) The Constitution of the United States.
Any suggestion that the Organic Laws are not legal documents by extension means the user is implying the Constitution is also illegal, which would further imply that our entire government is illegal.