I know this is going to be much hated and may even be sencored but... I honestly suspect that this is a puritan tredition which has remained within the church. not every word spoken from the mouth of a prophet is inspired and to think otherwise is to agree with the antis who try proving the church wrong with "unfulfilled prophesies" my doubts on this topic do not mean I do not believe the church is true, god nearly killed both joseph smith and moses so clearly even prophets are still humans capable of mistakes, . I am not intending to persuade anyone to agree with me on this, but presenting the unrepresented side.
if masturbation is so severe then why is it nowhere in the standard works? we have literally thousands of pages of scripture some of which goes so specific as to prohibit blended fiber fabric... and none of it deals with masturbation, not in the NT or OT, not in the BOM, it is not in the PoGP and it is not even contained within the D&C. virtually all the ethos on the topic is derrived from a talk given by boyd k packer in 1976. a talk which is based on a wholey inaccurate analogy (the clear flaws and the fact that that talk is not available on LDS.org are further evidence that this talk was spoken from his mind instead of inspiration) but people are afraid to question it because they forget that the Alma 32 instructs us to "experiment upon the word" and that there is no point to experimentation if you do not pay attention to the results.
the word of wisdom is a modern commitment but there are even hints of it in the OT. and science has toggled back and forth somewhat agreeing other ways for times disagreeing but the fact is that science has supported the WOW in many ways... there have been thuorogh scientific studies which have confirmed any alleged debtriments of masturbation and there have been many which have shown that a long term lack of ejaculation is debtrimental.
choose for yourself what you believe on this but know that the prohibition on masturbation is not supported by scripture, the most cited authority on the topic is one of the most inacurate analogies and is unavaiable on LDS.org, and science has only refuted it. (to anyone who thinks science should not be sited on this site, you need to study the doctrine a little more, "all truth belongs to the church, if there is truth in hell it belongs to the church" science is imperfect, but it does frequently find truth.)