Our fathers on earth punished us for a short time. They punished us the way they thought was best. But God punishes us to help us, so that we can become holy F159 like him.
We don't enjoy punishment when we get it. Being punished is painful. But later, after we have learned from being punished, we have peace, because we start living right.