This phrase is easier to understand if it is read as "You can't eat your cake, and have it too". Obviously once you've eaten your cake, you won't have it any more. Used for expressing the impossibility of having something both ways, if those two ways conflict.
He works so hard to pay for that fancy house of his that he never has any time to stay home and enjoy it.
Once eaten, you no longer have it. Like having money and spending it all. Also, in marriage, security vs. freedom - if one cheats, they lose their security of keeping their mate.
She's married to Bob but seeing Bill. She can't have her cake and eat it too.
When someone wants all of the benefits of a relationship without the commitment. Typically used when seeking sexual favors
Billy has been trying to get withSally for the past few months, but she won’t sleep with him unless they’re in a relationship. She told him, “ you can’t have your cake and eat it too”
When you have exactly what you want in terms of a relationship with one person. Yet you find yourself wanting that little extra something from another.
Tiger Woods response to the media after they found out about all of his affairs, "To the public I'm sorry, but you know I, just like most men, I want to have my cake and eat it too."