I think punishment might be too strong a word.

I think "consequence", albeit unfortunate, would be more accurate, just as herpes might be a consequence of unprotected heterosexual intercourse.