This can't sound good in any way, but do you push hard when you poop? If so, don't, it won't lead to anything good.
I believe this is not particularly unusual, especially if you’re not ejaculating regularly from sex or masturbation. The prostate can become engorged w/ fluid when not released regularly & then it doesn’t take much to trigger an ejaculation. That’s why when guys don’t have sex or masturbate, they often have nocturnal emissions - so-called ‘wet dreams’. Because the prostate is located near the anus, just the pressure of evacuation can be enough to trigger a release of accumulated fluid, and that would happen without any sexual thoughts or pleasure, just as you described. This has happened to lots of guys, so don’t be alarmed.
It’s not harmful - however, my advice is, it’s better to have a regular release of those fluids that build up in the prostate. There’s a significant amount of evidence that regular ejaculation reduces the chance of getting prostate cancer. The thinking is, the fluids that build up there become kind of ‘stagnant’ which is not healthy & may lead to changes in the prostate which could increase chances of getting prostate cancer years later.
Also, a lot of guys can have prostate issues that are NOT cancer, but become very bothersome - Prostatitis. The prostate swells & there’s pain when sitting, irritation when urinating & often painful ejaculation w/ no pleasure. It can be caused by a bacterial infection, but there’s also a non-bacterial form that may be related to irregular sexual activity. Dr’s believe the prostate gland is kind of designed to function best at maybe 3-5 ejaculations a week - either too much or too little can cause prblms. Now I know that younger guys may kind of ‘need’ more than that - I sure did! And it seems not to be a prblm for teens & 20s, but once you reach full adulthood, 3-5 is prbly a good number.
One of the worst things for the prostate is going long periods without & then having many ejaculations in a short period, like on a weekend. So try to maintain kind of a regular ‘schedule’ of ejaculation for best prostate health. If you don’t have a sexual partner, the solution is quite simple & all guys know what it is - LOL !!