I'm sure both play in. The RK271 is large (roughly 25 mm square), so it requires a larger chassis. If you want the volume pot centred vertically on the front panel for aesthetics, you're in a 50 mm tall chassis all of a sudden, which increases the chassis cost. It also increases the cost of shipping boxes, foam, and the shipping charge itself. My mind is blown every time I order boxes at U-Line. It seems I end up spending $300-400 easily on maybe 100-150 boxes and packing material. Think about that next time you get "free" shipping.
The RK097 has ±3 dB channel tracking. The RK271 has ±2 dB channel tracking. Those are the spec sheet numbers. As shown by Amir's measurements, they tend to perform better in actual use. A logarithmic pot is made from sections of linear resistance tracks. An expensive pot like the RK271 has 3-4 sections. An economy pot like the RK097 generally has two sections. It's at the transition from section to section that you see the tracking error. Basically one wiper makes it to the next section a smidge earlier than the other, so you get an error. I've tried to find these spots of larger tracking errors and succeeded with the RK097. It's only in one very specific spot that you can measure the error. If you nudge the volume knob even a little bit, you're off that discontinuity between tracks and the pot tracks well again. It's basically something like 8 o'clock to 8:00:05 that shows the error. You'll be extremely unlikely to notice in actual use - especially in a low-gain amp.
I have heard tracking errors on an RK271 pot. That was in a tube amp with high gain. The high gain made it necessary to turn the volume control almost all the way down to avoid blowing my ears. At attenuations below 60 dB, the tracking is worse. This is covered by the spec sheet. In my view, it is a design flaw to have such high gain that the volume control never makes it above 60 dB attenuation.
About your other point: Let's use your numbers for the sake of argument: $22 for the RK271 and mounting bracket. First off, that number does not include the assembly cost. You'll now have to pay someone to turn a screwdriver and a wrench, which is expensive (at least in the western world). Also, the RK271 does not like to be machine washed (the label blows off, which exposes the innards of the pot). So it can't go through the wave solder + flux cleanup like everybody else. It has to be hand-soldered using solder with no-clean flux. So you now have to pay a solder slinger to sling solder, which adds cost. I don't have hard numbers on exactly what that added assembly cost is, but let's for argument's sake say it's $5. Now that "just $12 extra" pot costs you $27 extra in manufacturing cost.
Then there's the concern about profit margin. Businesses, such as mine, exist for the purpose of making money for their owners and/or shareholders. I like to eat periodically. I would also like to receive a salary that's reflective of my skillset, education, and fair market value. I'm not looking to get rich and famous. If I could make, say, 80% of an engineering salary and have the freedom that comes with self-employment, I'd be happy. I have yet to make it there. I'm not even close, but I'm working to get closer. So... To make money, I have to charge more than cost. Sorry. That's how businesses work. If I charged at or below cost, I would not have a business. I would have a hobby.
How much to charge depends on your brand and your distribution channels. A well-known prestige brand might be able to charge 5-10x cost, or more. An unknown low-end brand with online-only distribution might only charge 2-3x cost. I run a one-man show, so having some distribution would be nice as it would allow my customers to buy and receive my products even if I'm on vacation or otherwise unavailable. Distributors of unknown brands, such as mine, generally charge around 40%. If I use a representative to engage with that distributor, there goes another 5-6%. So if I want to break even, I have to charge roughly twice the production cost. As covered earlier, breaking even is not a good business model, so I'd have to charge more. Suddenly that "only $12 more" pot ends up adding $80-130 to the final price of the product, not counting the added chassis cost and added costs related to shipping and shipping supplies.
That's why a $99 headphone amp cannot contain a $15 pot.
This concludes today's business lecture.
Tom