why they do it is what mobster said for the most part
but the smart guys do it because frankly it is the healthiest way to exercise. runners SHOULD run barefoot as much as they can instead of in shoes because it prevents injuries
having said all that if someone works out barefoot in any half decent gym they should be kicked out, that is incredibly disgusting and unsanitary.. the only time i lift barefoot is in my own garage.