The two are similar but different. Both will build cardiovascular fitness and coasting down a fast, rocky trail is very much like riding the same trail on a dirt bike. Upper body position at speed is another way they work together. Big drops and steep downhill - check. Obstacle avoidance - check.
They are different experiences in turns because you just don't have the same horsepower on a mountain bike, weighting the front wheel is done different, and your feet are locked onto the pedals. Peddling and standing on the pegs is different for building leg strength. It's a different motion. A mountain bike doesn't work your upper body as much because a bicycle is so much lighter.
Mountain biking is a great way to mix it up with dirt biking though. You don't need a green sticker on a bicycle either.