This phrase stresses the impossibility of having two conflicting desires met at the same time. He wants a high-paying job without working hard; he's trying to have his cake and eat it.
Pro Tip 2/3
Unrealistic Expectations
Using this phrase suggests that someone's expectations are unrealistic or greedy. You can't expect to party all night and still perform well on the test; you can't have your cake and eat it too.
Pro Tip 3/3
Common Uses
It's often used to highlight someone's awareness of the need to make a choice. If you buy a house, you can't travel as much—you can't have your cake and eat it.