This headline is grossly misleading, this isn't what the study says at all. Correlation does not imply causation!
This is an "epidemiological study" meaning it looks for statistically significant correlations between different factors (such as coffee and prostate cancer). In many (probably most) cases these correlations are either due to an external factor not considered, or are just a random statistical artifact (the phrase statistically significant is actually relatively meaningless, and about one out of 20 hypotheses will prove statistically significant in epidemiological studies due to random chance). What if coffee drinkers get less cancer because they're more likely to drink coffee instead of another beverage directly causing the cancer? What if these people are drinking more coffee because they have a hormonal problem that reduces energy levels, but also happens to lower cancer risk?
I can go on forever here with plausible alternate explanations, but my point is that this observed correlation doesn't imply that drinking more coffee will prevent prostate cancer!
When will science journalists and the general public learn that epidemiology only generates hypotheses, but doesn't test them? Every time I see an epidemiological correlation in the news it's presented as conclusive evidence that you should do x, and then a week later there's another study saying you should do the exact opposite for a different reason!
My takeaway conclusion from nearly all news headlines saying x is good or bad for you is that we need to do a better job teaching people about statistics, experimental design, and critical scientific thinking in school.