Why is it considered childish to wear shorts/leggings under a skirt or dress?

One of my friends & a girl I like, got upset that I wear shorts under my dress but with my thighs & other things, my dresses and skirts tend to ride up and it physically just feels more comfortable.
Why is it considered childish to wear shorts/leggings under a skirt or dress?
Post Opinion