Value is subjective and trades are made on perceived value.
If you have a ham sandwich and and I have a turkey sandwich, and let's say we each perceive the other's sandwich as more valuable. The reason we have a difference in perceived value is because we have differences in tastes. Each party trades and each perceives they have benefited. This is the foundation of mutually beneficial trade.
If you translate this to the FFXIV economy, you have a darksteel haubergeon and I have a Vanya robe, and I am a DRG and you are a WHM. Because of our circumstances we perceive different benefits from possessing each item.
The price of a particular item, it is important to note, is set by the seller on the expectation or probability of a purchase. The probability of a purchase is determined by the potential buyers. Furthermore, the actual purchase is dependent upon not only the perceived value or utility of the item to the buyer, but also the perceived value or utility of all the other uses of the gil that would be used in the purchase.
Just because something requires 10 hours to farm it does not them mean it will be worth 10,000,000 gil. It could be useless and noone would purchase it. Only when someone perceives it as valued for that amount and they cannot gain any greater satisfaction using that gil in another way will that item be priced properly at 10,000,000 gil.