I think people believe that onani leads to looking at p0rn, which is inherently exploitative to those involved (men and women) and a foul industry. Likewise, it can produce exaggerated sexual fantasies that are unhealthy and can create predatory relationships.
It's hard to imagine jerking without explicit content, and once you have gone from Swimsuit edition to Softcore, it's hard to go back... From softcore to hardcore, it's hard to go back... From niche hardcore to regular, boring hardcore... It's hard to go back...
And it leads to becoming a person who does this frequently... And then, what if you want a family? Do you really want to be taht guy who is looking at crazy stuff and rubbing one out while your infant daughter is sleeping 30 feet away in her room? Do you want to be the guy whose wife is out of action from giving birth and you are like "Oh, OK, I will just look at explicit hardcore content and content myself..."
It's a bad habit.
It also creates crazy expectations of others which may even lead to so desiring some novel experience that you have an affair or "open" your marriage.
Yeah I believe there's this weird story about how like... Onani/onanism entered the vocabulary through the Old Testament character and then the notoriously private Japanese adopted the foreign word "onani" to refer to masturb8tion and so it just sticks in my head a bit more and comes out when I feel the need to slightly self-censor in consideration of being on the work net (it's not an English speaking IT team but, you know how it goes, don't be the shortest hanging fruit).