Then when he says, That is why, he clarifies the reason he gave with a sign. First, he mentions the sign; secondly, he assigns the cause of that sign (v. 31).
In regard to the first it should be noted that, as Augustine says in The City of God: "If God punished every sin with a penalty now, it would be thought that nothing was left for the final judgment." Again, if He punished no sin now, it would be believed that there is no divine providence. As a sign of the future judgment, God even in this world punishes certain ones temporarily in this world. This is especially seen in the beginning of... the legislation both of the Old and of the New. For we read in Ex (32:28) that on account of the sin of adoring the golden calf many thousands of men fell. Again we read in Ac (5:1-11) that on account of the sin of lying and of theft Ananias and Sapphira were destroyed. Hence also for the sin of receiving this sacrament unworthily some in the early Church were punished by God with bodily infirmity or even death. Hence he says, that is why, namely, as a sign of the future judgment among you many unworthily receiving the body of Christ are weak bodily "Their sorrows are multiplied" (Ps 16:4), and ill, i.e., labor under a long sickness, and some have died, namely, a bodily death (1 Th. 4:12).
Source: Commentary on 1 Corinthians