Pointers
Those who master safely flirting with insanity will master genius.
Those who master safely flirting with death will master living.
Those who master safely flirting with pain will master strength.
Those who master safely flirting with loneliness will master and value companionship.
Those who master safely flirting with uncertainty will master security.
Those who master safely flirting with heartbreak will master Love.
Context
Some of the smartest, most creative people have been at least at some point in their life, considered borderline "insane". There’s a saying, there’s a fine line between Insanity and genius.
Some Men traveled to the moon several times risking death, men traveled to far-flung lands on wooden ships risking death, their lives I would argue were more interesting and the stuff of legends and stories.
Flirting with pain could be going to the gym or running a marathon or climbing a mountain, activities which could be strenuous and painful, but that will make you stronger.
An only child who might have also grown up with very few friends might decide to have lots of friends as an adult and subsequently lots of kids, so her kid never gets to experience such as she did.
Entrepreneurs flirt with uncertainty, and if they succeed, they tend to enjoy more security (at least financial) than most other classes of society.
Anyone in a serious relationship is taking the risk of a broken heart, or of their lives being ruined by someone else’s incompetence or vices, they are trusting that their spouse would live up to their collective expectations for love and life, and as they battle through these together and win their love could become stronger.
Discourse
I would agree that you need not risk uncertainty to be secure, but to Master uncertainty, you almost certainly must.
Implied by the term "master" where and when used is the fact that it's not a requirement at least to attain those, although the heroes (masters) of those plots almost exceptionally have had to be subject to those rules.
Those are rules for life, the alternative of which is cheating and foul play upon which I frown.
It is also possible that one might enjoy the fruits of another person's Mastery, this happens a lot in almost all the examples given, and then maybe someone else's, "Mastery" here means understanding and gaining wisdom from the full range of emotions and possibilities by having experienced them or something close.