God uses ALL suffering to purify, and sanctify us, even when our suffering is caused by our own foolishness (a robber who gets thrown into jail)
...or by our suffering God's own private higher purposes of which we know not, NOW, but WILL know later....(Joni Erickson or Job)
...or vicarious suffering on behalf of other's foolishness (a teenager rides his motorcycle without a helmet and crashes, and his mother has to take care of him for the rest of his life due to brain injury...and his foolish decision)
But Scripture also tells us that we will receive BLESSING if we obey God's commandments and terrible trouble if we don't (Deuteronomy chapters 27 and 28).
This is unnecessary trouble...trouble that we would have completely avoided had we obeyed. (The children of Israel had to spend 39 more years arriving in Canaan when they could have made the journey in 11 days and then produced a fabulous kingdom of glory immediately...fine architecture, luscious agriculture, large blessed families, etc., as a result they wasted 39 years of kingdom building.
Scripture tells us that "the way of the transgressor is hard..." (Proverbs 13:15). In any way that we each transgress, in big and little ways, we make our way far more complicated than it would otherwise be.