(B) is wrong because of the phrase "casually contributes." The passage does not provide enough information to establish that sleep deprivation causes a bolstered bodily defense to illness. Instead, the passage merely shows that the two are correlated. So, (B) is wrong because it assumes causation where we only have correlation. The fact that it mentions the presence of other possible causes does not change that it still comments on the passage as a casual relationship.
(A) is correct in pointing out this flaw. To give you an example of what (A) is saying, let's consider age. Young adults likely sleep less than elderly people do. Young adults are also probably less likely to be ill than elderly people are. This does not necessarily mean that less sleep causes a lower rate of illness. Instead, it suggests that age may cause both the difference in levels of sleep and in illness frequency.
Does that make sense? Please let me know if you have additional questions!