I'm looking to get an MTB and have been looking for this particular one for quite a while but stock is hard to get hold of. I managed to find one in a store but the bike is damaged unfortuntely and the store is offering it with a discount of 10% because of that. The damage doesn't bother me too much but I don't know much about carbon fibre bikes and it seems like it is pretty deep so wanted to understand if this will cause me long term issues, I'll probably have this bike for the next 10 years.
I would not. You are paying for the frame. The SX Eagle RD has quite a few reports of failure, and it's bad quality overall. There's nothing special about the brakes (bog-standard entry-level), or the fork (Judy Silver TK, 30mm steel stanchions & basic Turnkey damper).
A carbon frame will provide more responsiveness on trails than alloy, but on-road this is no better - you'd be better off buying two bikes if, as per your previous questions, you'll be riding on road a lot as well. The weight saving here is nothing compared to the heavy tyres and upright position which will slow you down on asphalt.
And if you want a pure off-road machine then full-suspension alloy frame would be better.
If you are buying a bike with the advantage over alloy that it's 'more confidence-inspiring', then it doesn't make sense to buy one where you are concerned about frame damage before purchase.....
As far as this bike goes the frame seems to be the ONLY feature out of the ordinary, where the brakes are merely 'good enough', the fork 'entry-level', and the groupset 'cheap and nasty'.
I don't know much about carbon fibre bikes
Before buying a carbon bike, you should learn about the qualities of carbon fiber.
I honestly do not understand why people buy carbon fiber stuff. The warning about the special qualities of carbon fiber in nearly any bike manual should be a good reason to stay away from this dangerous technology.
Unlike a metal component that always cracks from the outside, by developing a visible crack, a carbon fiber component can just suddenly fail with no prior warning (well, unless you X-ray your bike weekly).
Unlike a metal component that can withstand impacts far beyond its fatigue limit, a carbon fiber component can dangerously weaken from a single crash impact. If you crash on a metal bike, you can always investigate the bike for bent parts and then keep a close eye on developing cracks for a certain number of miles, whereas the only advice I can give for carbon fiber components is "replace it if you don't know whether it's invisibly damaged".