A frame is built up from many different components.
A plain downtube might cost $25. An advanced one in a factory's catalog might cost $45 (tooling and engineering costs baked in). A custom one, hydroformed for this one specific model, might have its cost spread out over a run of 10000 frames to cost maybe $70 each, counting the engineering and design time behind it to fit the aesthetics and work for 4 different sizes.
A nice tapered bell-shaped head tube might cost $40, whereas a basic one might cost $20. The basic one needs precision machining to get the bores right and aligned. A non-aligned head tube, where the bottom hole might be off-center in relation to the upper one, might lead to weird creaking or clunking that's akin a loose headset, bad fork CSU, or loose fork bushings that shudder under braking at low speed. Heat from welding can warp the head tube as well, especially if it's a lightweight head tube and the welder did the entire weld around the fat downtube in sequence without allowing the tube to have the heat dissipated/sunk.
Some frame makers might opt to license some tech from current patent holders, like a straight off-set seat tube (from Knolly), to enable a short seat tube that accepts a long dropper. This is a cost that is passed to the consumer as part of the full price.
Chainstays are difficult to bend/shape to gain tire clearance, chainring clearance, chain slap clearance, cable routing, lateral bracing, pivot placement, etc. Doing all this creates a weak point that's prone to breakage. It's easy to throw extra mass to reinforce this area, with a thick plate of material, but brands put a lot of attention here to design in strength so extra material isn't needed.
How much does a quality hub cost? A quality handlebar? A quality seat post? Quality top tubes, seat stays, etc. aren't cheap either. Add up all the costs of the tubes, the precision machined bits like the head tube, BB, seat tube clamp area, pivot points, dropouts... a quality rocker, with bearings installed (quality ones that are $15-20 each), can cost over $250 by itself. A cheap rocker might cost like $100 for just two plates made of 7075 that bolt together, without bearings.
^ Over a dozen individual components make up a frame. Itemize them, at about $65 for each extensively machined dropouts and seat/chain stay yokes, $50 each for the head tube and BB shell, $30 each for the chain/seat stay tubes, $200 for the 3 main tubes... that's $680 for this frame, not considering the welding, coating, derailleur hanger, rear thru-axle, seat clamp, shipping, etc. A shop might charge $400+ for a CeraKote finish, for reference, if you demand a quality finish.
Jigs to make it easier to process a batch of these frames with consistent precision are quite expensive too, costing thousands or even tens of thousands. It's the wonder of Asian mass-production manufacturing efficiency that can get these frames to us at such competitive prices at this quality level, with so much value added on. I doubt they're getting rich at these prices, at least for the Banshee Paradox HT frame example, but merely just keeping the lights on and people continually employed.
Like another poster brought up, 6061 is less expensive than 6066 and 7005, which is less expensive than 6069. 7075 isn't easily welded, but is a far stronger alloy. 4130 Chromoly steel is a premium material that costs more too, but it's harder to shape, making it hard to come up with a unique aesthetic with it, to stand out from the competition.
"Production quality" is a term I expect to be more refined than "prototype" or "one-off custom". I place trust in such frames, and the experience the makers had from reiterating on their craft, to make something far more affordable than what I could've made myself. I feel spoiled by the choice. I personally can discern the differences between frames, even able to tell a lot from just looking, basing my judgement on my foundation of experience from riding many different frames myself. To someone without such experience, you perhaps just have to trust someone who does.
For example, it shouldn't be hard to see how cheap a Vitus Mythique's frame looks compared to a more expensive Specialized Stumpjumper's or a Banshee Titan's frame. You're getting an entire FS bike for the same asking price of a higher quality frame. The Vitus uses lower-cost catalog tubing (maybe from Astro Eng or Kinesis factory). Same can be said about getting an entire STA-TRU or WTB ST wheel for the cost of a single high end hub. Quality and precision costs more. Bikes made with less precision tend to have a cheap quirky feel.