Adversity is the result of disobedience. The wise man learns obedience and so escapes adversity.
On the other hand, the wicked persist in disobedience and will eventually fall into a pit from which they cannot escape.