Proverbs 27:22

Though thou shouldest bray a fool in a mortar among wheat with a pestle, yet will not his foolishness depart from him.

The saying stands within the gathering of Solomon's proverbs found in chapters 25 through 29, brought together in connection with Hezekiah about three hundred years after Solomon.
Pounding a fool as grain is pounded in a mortar with a pestle pictures how even severe, repeated and extreme correction, pressure, punishment and discipline will not drive foolishness away from him.
The reason is that his folly is deeply rooted in him, because he is settled in it and determined to remain foolish.
Deeply punishing or correcting such a person cannot remove it.

Schooling can be that kind of pounding without curing conceit, since neither teachers nor classmates can remove it, and the conceited person only becomes more assured of his supposed superiority.
The foolish virgins show the same stubbornness, for when the midnight cry awakened them and exposed their lack of oil they asked the wise for help, yet instead of promptly seeking the source of life they remained careless and indifferent and went where help could not be obtained.
The saying likewise describes one who persists in a groundless claim rather than admit and correct the error.

It also describes persistence in harmful habits such as smoking despite their damage and even warnings of death, since some cannot or will not give them up until it is too late.