Just like on planes.
We lived overseas for a few years when I was a kid, so my first flights were on BA and Pan Am in about 1973. We dressed up in outfits specially purchased for the journey -- dresses and tights or, a bit later, dressy pantsuits. And we were age 8 and 10! My mother wore a dress, hosiery, heels and of course Dad had a jacket and tie.
The higher ticket prices really kept the lower class off the aircraft. It was a pleasant and exciting experience up through about the beginning of the 1990s.
One of the last flights I took, an unshaven young lout went past my seat wearing pale blue threadbare pajama bottoms, with actual gaps in the fabric, and clearly nothing else below the waist. His woman had joggers halfway down her bum and a hoodie that spelt "Bride" on the back. Crass. I wish standards were such that they would be denied boarding unless properly attired.