It’s important to note that the retail to manufacture cost ratio is about 4:1, so an amp that retails $25K gets built for ~ $6.2K and the dealer pays ~ $12.5K for it, vs ~ $1.2K build cost, and $2.5K wholesale cost for an amp that retails at $5K. There are a lot more cost restrictions on an amp that costs $1.2K to make. For $6.2K a lot more money can go into the transformers, tubes/transistors, caps, resistors, switches, chassis, wires, connectors, and knobs, etc....those things can all impact sound. The bigger budget also allows for a more elaborate circuit, if needed.
Sound quality doesn’t always equate to costing more, but it sure does allow the designer to shop for the ingredients of his choice. A $5k amp should have adequate quality levels of everything, but some compromises certainly had to be made somewhere.