Here is the scripture reference: Doctrine and Covenants 98:23-24 (italics are mine):
23 Now, I speak unto you concerning your families—if men will smite you, or your families, once, and ye bear it patiently and revile not against them, neither seek revenge, ye shall be rewarded;
24 But if ye bear it not patiently, it shall be accounted unto you as being meted out as a just measure unto you.
So, at first I read this to say that if I have a hard time enduring any badness heaped on me or my family, that meant that I deserved it. "Ha! Serves you right!" I remember actually reading this to my wife during my preparation. That's hard! I wasn't sure how I could teach the kids something good from that. However, while I was actually teaching the kids during class, I had another thought come to me. Hooray for on-the-spot inspiration!
Why are we on this earth? Is it not to learn and to progress along our eternal journey? At what times do we make the most progress? Why, when things are tough of course! So if I can't bear some persecution patiently without retaliating, then I actually needed it in order to help me further my learning. I needed the experience in some way, at least to help me along my path. In that respect, it is a just measure. Not because I'm a bad person and I deserved the punishment, but because I am a work-in-progress and have not yet mastered the required patience.
Some experiences this weekend show me that this is also true inside the family. And I have a long way to go.