Parents know well the moments in life when their child is close to danger. A heater, a spinning fan and a pot handle that protrudes above a hot stove are all things that entice children. They want to touch, feel and reach out to explore everything. Sometimes those dangers cause more than pain—they can maim and cripple. We say, "Once burned, twice shy," and that is the lesson. Pain is a teacher. That which hurts us also instructs us.
Hebrews 12:11 tells us that no chastising is joyful, but it is painful. Yet the result or fruit of that is peaceable and good. Parents realize that in some cases a small amount of pain now can prevent much more pain later. God knows that too. We can learn from the pain of our mistakes and by that learn not to repeat them.