You can't have your cake and eat it (too) is a popular English idiomatic proverb or figure of speech. Many people misunderstand the meanings of "have" and "eat" as used here but still understand the proverb in its entirety and intent and use it in this form.