The word "legal" is used ambiguously to cover both.
By way of analogy, there are the Christian schools in Israel, which were founded decades,and in some cases, centuries before the State of Israel. The Israeli Ministry of Education calls them "recognized but not official."
The comparison is not exact on every point, but the points of similarity are these: Christian schooling, like Christian marriage, predates the State, is not defined or redefined, established, certified or controlled by the State. Its existence is not established, not subject to remodeling, or termination by the State. It is, however, recognized as existing, and accommodated as it functions according to its own recognized, pre-existing structure.
No it doesn’t, states and marriage law existed before Christianity, so did schools, and what does that have to do with the United States, where Christianity is not mandatory?
Why are you going off into the ozone land on this, try to stay focused on the law and politics here and protecting marriage.