Pegging isn't a replacement for a prostate exam any more than getting punched in the tit is a mammogram, despite the similar sensation. Get your butt (and your boobs) checked.
Prostate exams actually aren't recommended for most people anymore. It turns out they weren't great at catching prostate cancer anyways. Now they only recomend them if you actually have a family history of prostate cancer or other risk factors.
But also I don't think this is refering to pegging being a prostate exam. I'm fairly certain it's refering to the fact that some studies have shown that regular prostate stimulation slightly reduces the risk of prostate cancer.