Its not super hard to build reasonably light if you assemble the bike yourself. There are many parts which can be had in lighter or heavier variants at roughly the same price. You might be missing out on brand recognition or cool colours and stuff, but its possible.
Examples: Newmen stem + bar insted of Race Face, slightly narrower rims, light weight hubs instead of high engagement, Specialized or Scott frame instaed of Norco or Santa Cruz, EXO with insert instead of "Enduro" tyres, light saddle, avoiding needlessly heavy brakes (e.g. TRP DH/Quadiem), light cassette instead of fancy derailer, aluminium chainring, composite pedals, Vecnum dropper instead of Reverb, paying attention to the weight of fork and shock..... do all that (and some more stuff that i missed) and you can have a relatively light bike at no increased cost.