It's so much down to how they're maintained and used that it makes no sense to compare really.
The other thing is, you have to bear in mind how many of these parts are aimed at, basically, weekend warriors- how many miles will an average trailbike or XC bike do in a year? Less than the average STW rider will I'm sure. And then there's the multiple bikes thing. So what's the point in a BB that lasts 5000 miles if you only ride 20 miles at a trail centre twice a month (except in winter) or you ride every week but you've got 3 bikes?
The last square taper BB I fitted to my old bike lasted for 19 years, and some absolutely outrageous amount of miles. But it's amazing that it got to live out its lifespan, most bikes bought then and used as much as that bike would have been stolen, broken, or just binned or thrown up the back of the garage long before that. So when you look at it like that all that longevity starts to look less useful.
It's the exact same with motorbikes- people say "Why is the finish so much worse than cars". Well, the average mileage for a new sports motorbike is 4000 miles per year, and the average lifespan of same is about 5 years, according to industry stats- so why build a bike that'll cost £1000 more and last for 100000 miles when on average, most people will get more out of a cheaper or lighter one that lasts 20000 miles.