A PUBLIC SCHOOL is NOT a private business and has NO authority to override a parent's dress and hair decisions. Health standards can cover your feces red herring example.
So a public school isn’t a private business, so what? Both have the authority to set standards and both do.
You don’t like them, then don’t patronize them or work for them, or else work to get the standards changed. But a public school has as much authority as any business to set grooming standards. If they become overly zealous about it, there will be push back, of course.
Try telling a lawyer that a public school can’t set grooming standards and see what he thinks of your theory, because that’s what it is; it isn’t fact.