Why is it easy to walk barefoot on a beach but not mountain?

This is not the case. It's usually easier to walk barefoot on the mountains rather than on the beaches because the fine texture of the sand makes it difficult to walk barefoot.
Copyright Wanderlust World © https://www.ynyoo.com