Less functional than leg warmers though. Leg warmers were for athletes, especially dancers, to keep their lower legs warm between their slot for warmup and a performance. They always came off for the actual event.
Socks have the benefit of keeping your feet warm too, but you can’t pull them off quickly over your shoes.
Track pants are for essentially the same thing for track and field events (and later for basketball) - a covering to keep you warm while you’re inactive that can be quickly removed once you’re ready to move.