Don't forget the impact geometry has on off road handling too. For example, that all mountain Marin will have slacker angles and probably more travel than the Racer X, not just greater poundage, so of course it goes downhill more competently. Suspension set-up can have quite an impact too. A fork that has adjustable travel can make climbing much easier when you wind it down, as can a rear shock with different settings to choose from. Climbing is generally easier with firmer suspension, descending generally easier with softer. I'm not knowledgeable enough to explain it very clearly, but you really can feel it when you rid different bikes, so do what you can to get some test rides!

(The real answer is that we all need one of every kind of bike. )