1 Corinthians 11:32

but when we are punished, we are chastised by the Lord, that we may not be condemned with the world.

Hebrews 12:10-11

their discipline was temporary, and the effect of humour; whereas God chastises us for our advantage, to make us partakers of his holiness.

Treasury of Scripture Knowledge

Summary

It is good for me that I have been afflicted; that I might learn thy statutes.

Bible References

Good

1 Corinthians 11:32
but when we are punished, we are chastised by the Lord, that we may not be condemned with the world.
Hebrews 12:10
their discipline was temporary, and the effect of humour; whereas God chastises us for our advantage, to make us partakers of his holiness.