I definitely argue against a Snickers bar wiping out “the value of that entire workout”. While you might argue that pineapple is healthier, there are a lot of other factors to consider. Your daily caloric intake, your macronutrients, the psychological component (if that daily Snickers keeps you from raiding the fridge every night, then hell yeah, have it) and so on. I have been hitting the gym for 8 years now and I’ve competed on stage. Depending on my goals, I sometimes eat sweets straight from the bag while still in the changing room, right after a workout.
But this isn’t the place to discuss post-workout nutrition. Just wanted to chime in and say that you shouldn’t generalize too much here.