^^^ that's because of SRAM's single-piece cassette, Shimano's titanium, and the other tricks being played at the high end. But they are
expen$ive.
The least expensive cassettes are a stack of cogs and spacers all stamped out of sheet metal. The mid range ones have stamped cogs riveted to aluminum spiders.
The power dome ones are a single piece. Here's a pic I found via Bikerumor of a SRAM power dome cassette that broke. The stack is all machined from a single forging, and it's a forging just for this, not a "block" or bar stock. You can see the same if you look in the back of an XX1 cassette, except with the bigger shifts and cogs there's even more empty space. This is not cheap for them to make and the price tag is appropriate. Aside from weight this has other advantages - it's pretty hard to "fold" this cassette like the cheaper ones because there's just not a big flat piece that can fold, and the normal deflection you might get short of actual damage is also better withstood which is probably going to improve shifting.
I'm not so sure about Shimano's XTR titanium, which does not seem like it should cost so much as it does given that it's only different material, not style than XT, and probably still stamped.
To use one of these SRAM cassettes you also need a SRAM freehub, which also (not always but almost always on a MTB) means thru axle and disc brakes.