"Faithful are the wounds of a friend; but the kisses of an enemy are deceitful" (Prov 27:6). Our LORD is a lover (oheiv) who, though He wound us, "sticks closer than a brother" -
, yeish oheiv daveik meiach (Prov 18:24). His afflictions are always purposive and ultimately healing.
The aim of affliction is to ground us in the truth, namely, that we are not God, and that we must surrender ourselves to God's care, even in the wastelands and desperate moments of our lives. When we cling to this world, this life, and seek to make it of value apart from Him, we are living in a state of delusion and blindness. When we are humbled by God's loving affliction, we are set free from the futility of seeking to control the world, and are thereby made free indeed.
For those whom God has chosen, the fires of affliction are purifying fires, refining fires, intended to separate the precious from the dross. We glorify God in the fire when we can say, "Here I am, LORD, do with me as it seems good in thy sight, for I know I shall not have one stroke but thou will give me grace to bear under it."