At my Father's (public) high school in the early 1940s, every morning, the principal waited at the entrance and inspected every boy's trousers, coat and tie as they entered. If the clothes didn't pass muster, the boy was sent home to change
Even though his mom was a widower (my grandfather died of his WWI wounds) and the family barely got by, she, (nor any other parents) never complained that it somehow created an undue burden on them
I went to high school in the 60’s. If the teachers or administrators thought your skirt or dress was too short, you had to kneel on the floor and the hem had to reach the floor. The boys had to wear shirts with collars and absolutely no jeans, only slacks.
Male teachers wore suits and ties and women wore dresses.