Most inexpensive apparel isn't made with thick enough fabric on a dense enough stitch with the right blend of fabric to make them opaque. So any old cheap cotton legging from a dance supply store, Walmart, H&M, etc. shows underwear as soon as you bend over.
Leggings made from athletic materials or for athletic apparel brands don't tend to have that problem. And there are leggings that you can find at Walmart and Target that don't see though, one would just have to try them on before buying. That's not always going to be the case for every little girl buying a pair of black leggings for school.
Most leggings aren't transparent. If you see an outline or anything through them you have to be staring quite hard, and, well, that's on you...
No legging is transparent when standing perfectly straight. It does not make one a pervert or anything else you might be implying because one has he ability to catch underwear or camel toe from the corner of their eye when someone is moving or bending over.
ETA: You're talking about the specific design of a specific piece of apparel and I'm responding to your post as such. No one is necessarily making a judgement on girls that wear bad leggings.