To your second point, customers often do try to fool vendors into thinking they are in the consumer group that is offered lower prices. As an example, non-students use their old student IDs all the time.
Re: correlation with a legally protected class, this can be solved with marketing. Price discrimination based directly on gender would be illegal. But if you put one product in a blue box in the "men's" section and one in a pink box in the "women's" section, consumers will self-select. This is very common with razors, soap, and other such products.
Lastly regarding your edit, if a consumer pays his or her reservation price they are left with zero surplus. But that doesn't mean the transaction was pointless. The consumer gets the consumption value of the product. I'm willing to pay at most $2 for a bottle of Coke. That's my reservation price. If I'm offered a Coke for $2, and no vendor offering a lower price is available, I will pay that price and enjoy the Coke.