Life is serious business. Every action has its consequence. If G-d didn't judge us then there would be no justice in the world. From our perspective, if we feel that we are being judged, we are more likely to treat life seriously. We will then hopefully correct our mistakes in dealing with other people, ourselves and with the Almighty.
Judgment implies caring.
If you don't care, you don't judge. We look at G-d's judging us as the ultimate expression of His love and caring about how we live our lives. And then the son is punished. The Talmud analyzes each phrase at length to learn lessons for life. Therefore, perhaps the most important lesson for parents is that they must be unified in their goals and values and that they must be consistent with them in raising their children.