I find road cycling improves my constant aerobic strength whilst mountain biking greatly improves my anaerobic strength. I like to say "road cycling improves my endurance while mountain biking improves my strength," but they both play their part. I find if I am mountain biking hard for a few weeks and then switch to road cycling, the hills I once struggled with seem so much easier. Likewise, when I switch from weeks on the road machine to the mountain bike, I find that it's easier to do longer and longer distances. I also find I develop more upper body strength when mountain biking from muscling the bike around.
I suppose my attitude is different on the different bikes. On the mountain bike it's "how fast can you go?" and on the road bike it's "how far can you go?"
Mile per mile, mountain biking is a lot harder.