In space applications costs can be exaggerated compared to actual production environments because the risks aren’t mitigated by something like the FAA, meaning they are often mitigated by some downstream process. Besides, a lot of the the designs already include critical spares, so there’s more than a single run, even in a one-off design
An example may be a part with a long lead time and no redundancy. If it is found defective during testing, they need a replacement right away and don’t want the schedule to slip while it gets fabricated
The sunk cost fallacy already drives a lot of these projects...imagine how much worse it would be (and how many other, competing projects wouldn't get funded) if the costs were higher.
A lot of parts are hand-fabricated. The setup may take time but it’s not necessarily like a assembly plant that requires new dies on each design.
Often that's because they have to rebuild and reset the tooling. Within the run, though, the incremental cost should be minimal.
The huge costs may be huge, but not huge compared to the cost of the prototype.