What does "what for" mean?
For what purpose or reason, why, as in I know you're going to England, but what for? [Mid-1700s]
A punishment or scolding, as in You'll get what for from Mom if she catches you smoking, or The teacher really gave Bud what for. [Colloquial; second half of 1800s]
Learn more about what for