I guess I see this more like asking a friend who sells widgets on commission to get you a discount - they do that by taking a smaller commission, but in turn you choose to buy your widget through them (and reward them for the sale without them having to do the work of selling you on it) instead of going with the website and nobody getting a commission at all. The company does lose out - by paying a commission (or refunding a month of gym fees) it wouldn't have to pay because that particular incentive wasn't what got you to buy in the first place - but it's a potential loss the company chooses to take on. They can't restrict the promotion to "only in cases where it makes a difference in whether someone buys or not," so they give it across the board and just assume that sometimes they'll end up paying more than they had to.
(Timely topic, though - I'm looking at possibly joining our YMCA soon, and I'd have to choose which friend gets to have "referred" me and gets the free month of membership fees!) I wouldn't ask them to split the referral bonus, but I don't think I would be offended if someone asked it of me, either.