(18) If a man has a wayward and defiant son, who does not heed his father or mother and does not obey them even after they discipline him, (19) his father and mother shall take hold of him and bring him out to the elders of his town at the public place of his community. (20) They shall say to the elders of his town, “This son of ours is disloyal and defiant; he does not heed us. He is a glutton and a drunkard.” (21) Thereupon the men of his town shall stone him to death. Thus you will sweep out evil from your midst: all Israel will hear and be afraid.
The Gemara clarifies: This is what we are saying: Is this to say that a stubborn and rebellious son is killed for a sin that he already committed? But, as will be explained (71b), he is killed for what he will become in the end. The Torah understands that since the boy has already embarked on an evil path, he will continue to be drawn after his natural tendencies and commit many offenses that are more severe. It is therefore preferable that he should be killed now so that he may die in relative innocence, rather than be put to death in the future bearing much more guilt. And since he is executed for what he will become in the end, one might have thought that even a minor as well can be sentenced to the death penalty as a stubborn and rebellious son. And furthermore, the exclusion: “A son,” but not a man, indicates that a minor is in fact included in the halakha, as he is not yet a man.