Ascetics down through ages have been obsessed with conquering the carnal instincts of man and see a clear divide between flesh & spirit. Flesh involving the so-called 'lower' instincts of man and spirit being the higher aspirations. A battle between these two opposing forces takes place daily within us, according to this philosophy.
To a degree, upon self-examination, I can see how this idea arose and there appears to be an element of truth there.
No doubt, masturbation when practised ritualistically or obsessively may lead to an imbalance within the mind and emotions, but occasional practise, I'm sure, does no lasting harm.
The key as always, appears to be balance.