Is it unethical for professional societies to offer conference discounts to members?
Typically the organizations that do this are professional societies. And, as you mentioned, they have many more activities than just running the conference, so having membership fees separate from conference attendance fees allow them greater flexibility to manage their accounts. 

Some places allow membership fees to be paid out of institute funds (this depends on the country and the situation, of course). However, many countries also make such professional expenses tax-deductible (after a certain threshold). Obviously it doesn't recoup the full cost of the membership, but it's better than nothing.

However, one additional point to consider is that most such conferences require that at least one of the authors of a presentation to be a member of the society. (Sometimes, this requirement falls on the presenter herself.)