and it can be said that the price of a unit determines which one is better, i.e., the developers have set the prices intelligently (although this does not apply to comparing archers and infantry).
Well, I wouldn't say so... If the developers did set the prices intelligently, then 100% they also took into account the cost of building one or another dwelling.
Why, for example, does a King-Cyclops cost (as far as I remember) 1100 gold, while a Wyvern Monarch costs 800? Although the Wyvern is stronger ;)