My memory is kind of fucked up right now but I seem to recall this having something to do with the pelvic floor. If your abs and abdominal floor are very atrophied from lack of use, then when you strain on the toilet, the tissue compartment that houses the prostate and cowper's gland (where precum and semen come from) won't be strong enough to resist the downward pressure of straining, and semen will be expressed. So in theory if you did abdominal workouts and strengthened the pelvic floor, it'd probably go away.
In Chinese medicine they call it a jing leakage... there is some kind of essential vital energy lacking in the lower body, so semen doesn't get held and instead it comes out during bowel movements or urination. It's sort of like the semen version of urinary or fecal incontinence. The body lacks the tone or strength to hold it in so it comes out inappropriately. They usually solve it with herbs, like schisandra berry. They (rightfully) believe that if you keep leaking semen it will deplete your body because semen is nutrient and energy intensive to create.
Unless there's blood in the semen then I wouldn't worry about it. I mean, it's not normal but it's not going to kill you.