(Note: I don't have any evidence or sources to back up these claims.)
The most straight-forward reason there is ecchi in some shows is simply because the animators like to draw scantily clad (or naked) girls. You see this in a lot of fan-art or random sketches by some directors, who were once animators (for example: Imaishi).
But a possible added value for ecchi scenes is sort of two fold. These are shows that are usually in the late-late-night time slots and are sometimes on satellite stations, where they can get away with a bit more. This is usually the time slot for some of the more "enthusiastic" fans of anime, the ones who spend lots of money on merchandise and physical media (DVD/BD).
Having this kind of customer base, although much smaller than some of the non-late-night popular shows, means studios are likely to hit certain sales minimums just by pandering to this demographic. Figures (often scantily clad, or with explicit nudity) are sold and the DVD/BD's with promised uncensoring (or even more graphic nudity) are bought up. So it's more or less "Sex Sells".
The added value to the viewer is probably more a matter of taste. If you don't like that kind of stuff, you're probably not going to watch these kinds of shows. Some of these kinds of shows is pure fan service, with none of the ecchi actually playing any role at all in the story or plot (e.g. "Najica", "Agent Aika", "Green Green", etc), and more recently, eventhough it can be argued whether the ecchi really does have to do with story or not, it's tied more closely to the show, where removing it actually devalues the show itself (e.g. "Queen's Blade").
There has even been quite a bit of backlash for these late-night time slot ecchi shows because a lot of them aren't very popular and it can seem that a lot of studios (at least between 2000-2010) sacrificed quality and writing to simply have ecchi and pander toward a small demographic who happens to spend a lot of money.
Just to be clear "fan service" doesn't necessarily have to be ecchi, and it's almost always inconsequential to the story or plot. It's just there to please the viewer (assuming the viewer is into the show). It doesn't add much value to the story/plot and isn't necessarily supposed to.