why do girls wear leggings?

Genuine question and just to clarify I'm talking about stockings rather than active wear or yoga pants

But I've just never really thought about it I guess..