We don't "have" to take risks in many cases. We choose whether to do so or not. We could simply choose to live in our caves on bread and water and forgo the possibility of many activities that may bring significant pleasure but at the cost of significant pain. If "all pain is to be avoided at all cost" is the formula, then the cave-dwelling life would be a logical option.
Okay, so in some situations the hedonic calculus comes out even...equal levels of pain and pleasure...and thinking about it further I begin to see that that is why there actually might be an emphasis on activities that reduce pain. Because if you have two options: Option A - the end result will be an equal amount of pleasure and pain...and Option B - more pleasure and less pain...then you choose option B.
I think an instance of this is marriage...people go into it thinking that there will be more pleasure than pain, but only if you are lucky will this be the case...if you can find a very compatible partner with a similar world-view, similar life goals, similar likes and dislikes, and similar disposition, who is an emotionally grounded and rationally thinking person, who is healthy and strong, who knows how to problem-solve, who has good social skills and emotional intelligence, and who is kind, patient, generous, and loving.
So let's say two people with all these characteristics find each other and marry...it is possible that there will be more pleasure than pain. If any of these qualities are deficient then some problems will come up...and when they do, the pleasure and pain "hedonic calculus" will come out even...or could come out with more pain.