God (Via his assistant) unleashes all manner of misery and suffering upon Job, killing his family, ruining him financially and inflicting him with horrible diseases entirely to show that Job, as a loyal Jew, will remain obedient and loyal no matter what circumstances throw at him - and sure enough, at the end, God restores his health and wealth. Though not the dead family.
Not only that, but he did it basically on a dare.
God: "Job will do anything for me, no matter what"
Satan: "no way"
God: "yes way"
Satan: "prove it or GTFO"
God: "watch this..."