I go to the gym quite frequently myself and I honestly do think that is also why a lot of people go to the gym. BUT that's because people who go to the gym on a regular basis (like everyone else) have insecurities and doing something to boost ones' self esteem (i. e. compensate for said insecurities) is a GOOD THING. Now if they go so often that it gets in the way of their productivity or use harmful drugs then they're overcompensating but most of the time that's not the case. I think haters like that are just downright pathetic and are trying to drag down others to OVER-compensate for their insecurities.
Of course some people go to the gym to be healthy. I'm just saying if they go to boost their self esteem, so what?