“do not reject” The grammatical construction of the Hebrew text places an emphasis on the word “reject,” although it can make the English translation hard to understand. A lot of the bad things that happen to people are their own fault, not an “attack of the Devil.” When we ignore Wisdom, we can get ourselves into serious trouble. Biblically, this is referred to as the discipline of Yahweh, because He is the one who set the principles of godliness, the laws of nature and physics, the moral and civil law, etc., in place.
To not reject the discipline of Yahweh is to take a hard look at what has happened in our lives that we consider “bad,” and see if we ourselves caused the problem, or part of it. Proud and arrogant people just assume that everything bad that happens to them is someone else’s fault, or a demonic attack, and will not own any part they played in the problem. Humble and godly people always assume that there is something they could have done to avoid or lessen any problem, and only exonerate themselves when they have thought through the situation and seen that they could not have done anything better than they did.