Native English speaker and I also don't really get what "for" was meant to mean. At this point it's probably just something that everyone has memorised and part of history.
Or more straightforwardly, in a way that can be applied to other English constructs, "do that for this group"
It's the same "for" in my head in both those versions.