Well, we drink without being thirsty, eat without being hungry (and far more than we'd actually need), smoke, drink alcohol, spend hours staring at fictional events on a screen... At that rate, as weird as it is from an outsider's perspective, spending time in the gym is at least good for you.
I've been off for two weeks and I can't wait to go back - just hoping that the soreness from the accident will not interfere. Though it's easy for one's mind to wonder off, with a bit of discipline, the gym can be a place of intense focus, even if not on the higher order of ideas.
But yeah, I also have some of those "what the heck am I doing" moments...