IIRC, the point was that it wasn't entirely that the officials' actions were illegal. There were some earlier rulings and issues of being in loco parentis that clouded the issue sufficiently that the Supreme Court's hands were effectively tied. Of course, now that the Supreme Court has given an explicit ruling in this case, it would be pretty difficult for anyone to pull that defence in future.
None of this means the actions weren't grossly disproportionate, unreasonable, and abusive in the eyes of any sane, independent observer, but unfortunately that isn't what court rulings are based on.
Even worse actually. If the mandatory reporters at the school heard about this girl being strip searched by mom & dad for drugs, they would, without a second thought, report the parents to some authority. But when they do it in loco parentis the same behavior is OK?
The idea is that, when the search took place, jurisprudence didn't make it clear such searches are illegal. If the legal system is not sure whether something is a crime or not, then it isn't. In theory, anyway.
None of this means the actions weren't grossly disproportionate, unreasonable, and abusive in the eyes of any sane, independent observer, but unfortunately that isn't what court rulings are based on.