it’s just the bare minimum appropriate for public.
And your definition of that is arbirtrary. A jewish person might deem the bare minimim to be long legs and sleeves. A muslim person might deem the bare minimum to cover the hair too. Some people find pants need to cover the knees, others find crop tops problematic. It all remains arbitrary. Is a boy wearing a skirt okay? what about wearing net stockings until under the skirt? Knee high leather boots? In our cultures these tend to be sexualized, even if they perfectly adhere to your underwear rule, theyd probably cause more concern than saggy pants.
Is wearing a hat or cap indoors disrespectful? in elementary school we had to take our hats off in class. In high school my jewish arts teacher always covered his hat.
Is it okay for men to be topless in Summer? ask around and you’ll probably get quite a few different opinions in your community.
None of these are right or wrong by principle. They are just the result of different cultural norms, hence arbitrary.
EDIT: Also in Kindergarden we were roaming around naked, playing with water and slising on water slides, which was perfectly acceptable in my state in my country. Two states over it would probably have caused a lot of discussions. Still i’m very happy that our bare minimum was to play around with water in hot summers as opposed to sweating like crazy.