Hebreus 12

10 For they indeed, for a few days, punished us as seemed good to them; but he for our profit, that we may be partakers of his holiness.

11 All chastening seems for the present to be not joyous but grievous; yet afterward it yields the peaceful fruit of righteousness to those who have been exercised thereby.