Why children have to wear socks instead of walking barefoot or wearing shoes?

Children play wearing socks because of security. While getting on the play hall children may wear slippers however they should take them off when they go on slide or colorful labyrinth to protect children from any kind of injuries.