I feel the need to interject here, probably because my biology degree isn't doing me any good at the moment in any other area of my life.
Orc is right about most of his points. All biologists would agree that the urge to reproduce is a fundamental part of any organism - humans are no exception.
The difference is simple: Humans have a bit extra. Instead of being 'mere' animals, who basically say "Weeeell, feeling that urge, time to go try a little MATING DANCE!" (cue "I like to move it move it") humans have cognitive and metacognitive abilities that animals do not possess.
No matter how it is achieved, the act of satisfying these reproductive urges is fundamentally pleasant (Barring unusual medical conditions). Herein lies the problem. Many religious or societal constructs assume that this is giving in to the beast, or "the flesh" as it is called in the Bible, and place an incredible taboo on performing or discussing any such act outside the single sanctioned act of marriage.
In actuality, these organizations set up a cognitive dissonance in those who listen - coitus and autoerotic stimulation are hardwired into our bodies to reward us with endorphins, which function as a sort of 'pat on the head' from our brains to let us know that we just increased our chances of winning the natural selection game. To have exterior forces telling us that these completely natural, irrepressible rewards are a reward for doing something wrong forces us to address the 'impropriety' we have committed - often at too young an age to grasp the implications, and at an age where we merely bow to the half-understood influences outside our scope of knowledge.
For this reason, many less Puritanical organizations (including quite a few Christian authors)
recommend autoerotic stimulation as a means of avoiding improper or 'impure' thoughts. By satisfying the biological need with a minimum of fuss and bother and moving on with the day, an individual can take his or her mind off of this need and focus on more important matters instead of fantasizing.
Unfortunately, there is a direct link between pornography and satisfying basic biological needs. When a pet performs a trick, and its master gives it a treat, we call this "positive reinforcement." What many people do not realize is that the body performs its own positive reinforcement. The same endorphins and feeling of well being that an individual achieves from satisfying their natural reproductive needs can accompany exposure to pornography to actually train the individual to seek out pornography. The natural instinct of any mammal is simple: "If it feels good, do it."
I believe this summarizes the problem. Those who repeatedly stimulate themselves when accompanied by pornography begin to unconsciously or consciously link the feeling of pleasure to a source outside of a normal and healthy relationship between individuals. Therefore, a behavior that carries social stigma becomes irrevocably linked to an individual satisfying innate biological needs. For this reason, avoiding pornography tends to be beneficial - whether an individual is concerned for private, social, or religious reasons, pornography can bring out the dark side of autoerotic stimulation.
Note: I do realize that autoerotic stimulation has more than one meaning, but it is perfectly appropriate in this context. Calling it "masturbation" just makes it seem flippant, and I have a sneaking suspicious people tend to react to that word like a six year old boy reacts to hearing the word "butt," by snickering to themselves.