The first instance of the prosperity gospel being preached came from Job’s supposed friends. They said Job must have sinned, otherwise he wouldn’t have had it all taken away. They declared that God would always bless good behavior. At the end of the story, God said Job’s friends spoke incorrectly of Him.
At the end of the story? At the end of the story Job was blessed by God for remaining faithful. In face, he was blessed with more then he lost.