This is actually a very important subject because it bring to focus the reality we are sexual beings with sexual attraction.
For me the problem is to separate the sexual desire you have for someone which is a biological mechanism and real relationships and the meaning of intimacy. Masturbation is often about sexual release, and too often we can deny our sexual reality, believing we are above these mechanisms in our lives. Too many people I have met were they are confused between what is their personal expression of love and affection and need and sexuality. Much sin and confusion comes from inappropriate mixing of the two when people have no loving intention but only focus on lust and exploitation.
Masturbation causes problems because it takes away the interaction with others, but many have to deal with changed relationships within marriages and compromise. Whether people are honest or not, but it is going on everywhere, it literally is part of life and coping. To put things truly in context the problem with adultery, is we come from a sexual relationship, and the covenant relationships that underpin it or not. Many people exist because of a lack of sexual understanding and control, and overthrows families and stable relationships with great pain and anguish. So masturbation is often a simple compromise that works. Now if you deal with the whole issue of sexual identity, need, and love you can begin to approach the difficult issue in life.