friend commented y waste 2k on a mtb to do trail when a $300 mtb can do just as well. more like paying for branding.
Your friend uses hyperbole much? Supposing if the frames are the same, a 2k speced bike will be of magnitudes more capable than a $300 spec. Maybe at the 1.2-1.5k vs 2k levels (SLX onwards) that the returns start been more marginal.
Then you need to ask yourself as to what outcome and target are you looking to derive from getting into MTB.
Looking to simply explore nature on simple flat trails (Green Corridor)?
$300 mtb is fine
Looking for mostly leisure rides on PCN
$300 mtb is fine
Looking to attempt or be able to attempt more challenging local trails (Some parts of BT, gangsa, Ketam)?
Min SLX
Looking to challenge yourself physically and technically on trails?
Min SLX
Looking to ride in wet conditions
Min SLX
etc etc etc
Don't just talk about MTB. Even for road, foldies, velos, there is a clear border in the component technical specs that demarcates the minimal level of value that one should get when intending to be more serious in their involvement of the sport(Road: 105(?), MTB: SLX). Any further technical increases from that line on is mostly marginal and focuses on weight.
You need to decide where you are going to fit in this scheme of things to know what kind of bike and parts you should be spending on.
can the 2k mtb do something which the $300 mtb cant do other than going faster thru the trail with better components
Ask your friend to bring his $300 mtb and do the black diamond on Ketam. Can be done if the rider is skilled enough. But regardless it will not be that pleasant of an experience.
Remember to video it.