It's a mutual deal...
Road riding helps build endurance and aerobic capacity. I find it helped me a whole lot in simply having the ability to keep trucking along the trail and over the many little rollers.
On the other hand, mountain biking really helps your bike handling and technical skills. I teach the League of American Bicyclists' "Smart Cycling" classes, and I find that my students who come from an MTB background have far less problems in mastering the handling and avoidance drills. Road bikers tend to want to go in a straight line all the time, MTB'ers are used to panic stops, quick turns, dodging obstacles, and leaning the bike.
Personally, skills I learned on my MTB have saved my butt out on the road a bunch of times in the past year or so... from hitting a deer and staying upright, to hitting a possum while pulling a paceline (in the dark, no less) and rolling right on, not to mention all the other little road hazards.
I ride mostly road and urban commuting, but almost any time on the MTB is quality time.
Tom