Judges are using pretty much the same logic of Supreme Court Justice Taney in the Dred Scott decision. If slavery was to be legal anywhere, then no state could exclude it, like Minnesota in that decision, which was as responsible for the Civil War as anything.
Sorry. Wisconsin, not Minnesota.