The inability to know why their former spouses were taken away from them and the limited nature of life is why they must remarry and try to regain some of the happiness taken away from them. Job's case was different. He knew who took away his family, and knew later that it was part of his god's test to him. His former family blotted out and replaced like a manufactured commodity, as if the past didn't matter.
He MIGHT have known about that. It is uncertain who penned the book. And even if he did, are you saying God could not have grown his faith to the point it embraced and appreciated God’s goodness in the face of the setbacks?
Remember, these stories all come out of the Middle East. To the men who wrote the Bible, women and children were pretty much replaceable commodities, and if the new woman was younger than the old one, hey... he traded up.