The sentence uses words like “gain”, which means it is stated relative to something else (driving). If we’re going to look at the group, why not also at the individual?
We don’t optimize everything for the group. Some things? Yes. All the things? No.
you gain all kinds of health benefits from the exercise, and if enough people bike, you'll gain health benefits from lower pollution in your environment. That latter is more of a society thing though, which you don't seem to care about...