I don’t really do of the Peg MTBs, My BMX is largely stock, as was my road bike (till I changed the wheels), but I’m not that bothered about either bike beyond them working
I have assembled all of my MTBs from frame + aftermarket bits/spares/2nd hand stuff for the last 10 years or so, not sure if that’s a better, or even cheaper approach than buying a stock bike and then just changing parts as you go, probably not, in the long run assembling the whole thing takes more time and probably still costs more and you still end up making the odd compromise due to budget…
But then you know the bikes ins and outs better and definitely own all the tools to sort it out so that is one advantage.
Plus I don’t think you’d find many stock bikes that came as standard with XTR brakes a Hone crank with a Hope BB, SLX Mechs LX/STX shifters and an 8 Cassette, proper mix and match spec is the major benefit of the “self build” approach….