Then again doing stuff DIY is going to save some real money.
Sourcing and building yourself can drop the price drastically, and what probably saves most is the wheels.
You can get a pretty bomber wheelset with carbon rims and hope hubs with about $700. It's not cheap but if it's well built it's probably as good as any commecial wheelset out there.
And of course while building yourself you can but value where it's needed like the shocks, wheels, frame and skimp on the stuff that works just as well in the cheaper categories but is a bit heavier (cassette, brakes, crankset, chain, etc)
But yeah, 4k is the absolute max I would ever put in a MTB but then again I don't ride a full squish so that brings down prices pretty nicely as well