Thank you for your question. Illness, as well as other types of ordeal, covers a variety of purposes including the forgiveness of sins, an increas in thawab and an increase in stations.
For a discussion of some of
the ahadith in this regard please see the following podcast episodes:
May you always be successful