The Holy Quran tells its readers about the stories of Prophets so that the readers get guidance and direction. Hazrat Ayub (A.S) was one of the dearest Prophet of Allah (SWT) and his story is very inspirational.
Ibn Ishaaq stated that he was a man of Rum and he was a descendant of Abraham's offspring. Hazrat Ayub (A.S) was very thankful to Allah, he was repentant and his strength was patience. Hazrat Ayub (A.S) was blessed with wealth, he had children, horses, land etc. the best part was that he was famous in angles and he was considered to be a role model.
Iblis (The Satan) came up with the argument that just because Hazrat Ayub (A.S) has the wealth, heath, horses and children that’s is why he is so thankful to Allah Almighty, if Allah takes away all these blessings , Hazrat Ayub (A.S) would become like other people.
Allah (SWT) has this Sunnah of testing his people so he tested Hazrat Ayub (A.S) by taking all his wealth and health, but Hazrat Ayub (A.S) was the man of patience and determination, he always remembered Allah (SWT) in those conditions too.
Allah (SWT) says in Quran: “Truly! We found him patient. How excellent a slave! Verily, he was ever oft returning in repentance to Us”. At another place Allah (SWT) says: “Commemorate Our Servant Job. Behold he cried to his Lord: "The Evil One has afflicted me with distress and suffering,”