Apple is a business and prices its products based on demand. If people are willing to pay a high price, you bet they're going to charge a high price. The savings from not having many hardware variations on a single model are simply accumulated into their bank account.
And they might not cut costs when it comes to the hardware itself, but they are known for having a limited number of options and customizations when it comes to hardware.
I suspect nobody uses that entire row, so if you're not going to do anything with it besides an escape key, you may as well throw in something interesting.
I've got and used several non-apple laptops that use the row for media keys, and switch them to the function keys with a press of a dedicated fn key at the bottom.
I don't use function keys, but do use the media keys (mostly volume and screen brightness) by touch. The touch bar is hilariously named imho, because you have to look at it to use it.
Price? I have no idea what the markup on the touchbar is, but I'd guess it's at least in the $50 range, no?
When you're buying a $1650-4000 machine, $50-100 probably isn't gonna make potential buyers balk.
When you're buying a $99 keyboard, $150 is a fairly big difference. And honestly given the $99 price tag on Magic Keyboard, I'd guess Magic Keyboard + Touch bar would be like $199 at least. How many people do you think would buy it at that price tag? You also have to consider that Magic Keyboard currently works with windows, linux, etc, so the potential users are much wider than a Touch bar enabled keyboard, which would only work as intended with macs.
I assume it's some combination of price, performance, and battery life on the external keyboard.
You can use the Touch Bar on your iPad (using an app like Duet Display, or even with Sidecar if you have a modern MacBook). I find it to be useful in certain situations.