In the case of masturbation, it doesn't have anything to do with the Bible, but it has everything to do with a now-discredited (and actually misogynistic) pseudoscientific hypothesis.
To give a more extreme example, there was a theory in the antebellum era known as polygenism. Scientists (and some southern theologians) argued for multiple Adams and multiple Eves because apparent human regional variation couldn't be explained within 6000 years. (The conclusion was not surprising: Blacks created just for slavery, Indians created merely to occupy the continent until whites came along.) Ironically, today the positions are reversed. Does this mean that members of conservative denominations should be allowed, nay required, to own slaves?
The rule about masturbation (and any other activity) is balance. It shouldn't interfere with your social life, and you should be careful not to objectify people.