The legal standard for salaries from a 501(c)(7) organization is that "no part of the net earnings of which inures to the benefit of any private shareholder" is arguably slightly more permissive than the rule that applies to 501(c)(3) organizations, which is that "no part of the net earnings of which inures to the benefit of any private shareholder or individual[.]"
So, at a minimum, a 501(c)(7) organization may pay an officer of the organization an amount equal to the fair market value of those services in a comparable "for profit" organization.
It isn't entirely clear to me without further detailed research if the omission of the "or individual" clause in 501(c)(7) actually has legal significance in the context of gift-like benefits to someone other than on account of being a member or owner of a club. It probably does allow some kinds of transactions of this type.
If they can, how does this not "inure to their benefit"?
The legal theory is that one is looking at "net benefit". If an officer does valuable work for which the officer receives compensation, the officer is making a barter of two things of equal value: the officer's valuable services for money. There is no net benefit to the officer who merely "breaks even" economically in a salary transaction.
In contrast, a payment on account of a membership in or ownership of the club, or simply as a gift from the entity to an individual not directly incidental to its expressly permitted tax exempt purpose, involved the individual or private company receiving something without providing something substantially equivalent in return. So, this is a net benefit to the individual or private company that receives something from the 501(c) organization.