That exception makes no sense, acting on the urges with masturbation is the illness, not the urges themselves, they are meant to remain unsatisfied outside of reproductive sex.
Your sexual organs need exercise to be healthy, just like every other part of your body. Ethics is more rational when we replace the Good vs Evil dichotomy with Healthy vs Unhealthy.
There is no medical need for people to masturbate unless they have some form of sexual dysfunction which can be treated by it, it looks to be neutral in moderation.
Masturbation is not necessary for the functioning of the body or the sexual organs of men in general, it is an optional personal choice they can make to do, not medical necessity.
I am not making an ethical/moral/healthy claim, I was probing TrashPoster about his arguments about what he categorized as mental illness. I do not think that here needs to be any->
-> reason, ethical or health related, to masturbate. It is just something that people do because they enjoy it, I am not making the claim that it is a mental illness or wrong either ->
-> every person knows best what is best for themselves and they should be free to chose, there does not need to be a "health" or "ethics" justification for doing anything with your ->
-> own body. But there is no need to do anything that is healthy unless one feels like it either, masturbation is just a personal choice a person can make without any justification.