I have found that if you buy from a reputable manu. and you do not abuse the bike it will last a very long time. I road a Carbon frame for 8 years that I used for drops, jumps xc and dh. The only reason I got ride of it is the manu. gave me a free up-grade on a trade for it.
All my alluminum frames but 2 have lasted me 5+ years. Yeah I do take very good care of my rigs by using frame protection when needed, regular maintinence and so forth. Most frames I see that guys are craking are either going huge or the don't take good care of thier bikes (i.e. just droping them on the ground, throwing them around etc.).
I and a few others I know of take as good of care of our mtb as you see some of the snob type rodies. yeah we beat the shyte out of them when riding but we always go over all the nuts and bolts after and keep them looking new.