1 : Ill health is caused by our own actions because we or our forefathers did not remain on straight path under His directions.

2 : God is kind , He gave that skill to the doctors to releive our pains, so indirectly He is curing our ills which was a punishment [ a chance to learn a lesson ] from Him.