Its not $10,000 for a hammer from home depot.
Its $6000 for a hammer that only one is being made, of an exotic material that is not needed, in a dimension that makes no sense and coated in a way that makes it prohibitively expensive. Instead of the GOV saying this is what we are trying to do, come up with a solution (Performance work statement), they use a Statement of Work with design specs made by overpaid and underworked bored engineers who do not care about wasting taxpayer money.
Then there is the $2000 worth of profit that the company needs to make on the contract to make this even worth it.
The the other $2000 is for compliance, documentation, certification, training, insurance bonding and a whole host of other shit that is required to satisfy the 87 addendums, contingencies, appendices and clauses.
That is how you get a $10K hammer. Or its going to be used in space where its costs 100 times that to lift it into orbit and you need to make sure its safe and as lightweight as possible while still being able to perform to its design specs.
The $30K toilet seat was a one off, space shuttle part. Everyting aereospace is stupid expensive. Anything going into a space is an order of magnitude more. Context matters.