To wish to have one's cake and eat it too (sometimes eat one's cake and have it too) is to want more than one can handle or deserve, or to try to have two incompatible things. This is a popular English idiomatic proverb, or figure of speech.
The phrase's earliest recording is from 1546 as "wolde you bothe eate your cake, and haue your cake?", alluding to the impossibility of eating your cake and still having it afterwards; the modern version (where the clauses are reversed) is a corruption which was first signaled in 1812.
Comedian George Carlin once critiqued this idiom by saying, "When people say, 'Oh you just want to have your cake and eat it too.' What good is a cake you can't eat? What should I eat, someone else's cake instead?". Of course, in the original correct form (eat your cake and have it too), Carlin's critique does not apply.