The statute governing absentee ballots says:
Sec. 203B.08, Subd. 3.Procedures on receipt of ballots. When absentee ballots are returned to a county auditor or municipal clerk, that official shall stamp or initial and date the return envelope and place it in a secure location with other return envelopes received by that office. Within five days after receipt, the county auditor or municipal clerk shall deliver to the ballot board all ballots received, except that during the 14 days immediately preceding an election, the county auditor or municipal clerk shall deliver all ballots received to the ballot board within three days. Ballots received on election day either (1) after 3:00 p.m., if delivered in person; or (2) after 8:00 p.m., if delivered by mail or a package delivery service, shall be marked as received late by the county auditor or municipal clerk, and must not be delivered to the ballot board.
https://www.revisor.mn.gov/statutes/cite/203B.08
However, the Secretary of State apparently relied on the following subdivision of the same statute when he extended the deadline:
Subd. 4. Rules. The secretary of state shall adopt rules establishing procedures to be followed by county auditors and municipal clerks to assure accurate and timely return of absentee ballots. The rules of the secretary of state may authorize procedures and methods of return in addition to those specified in this section.
So there's a conflict between the part of the statute that says the ballots have to be received on election day and the part that allows the secretary of state to authorize "procedures and methods of return" in addition to those specified. I haven't seen the court's order but I'm guessing that's why late ballots will be set aside pending a final resolution.