No *special* significance. In other words it puts equal significance on all aspects of the building, as situationally appropriate.
The distinction of what the main bonus is is blurred - take for example a Marketplace, if it provides +2 or more happy from resources then the happiness is probably going to outweigh the +25% gold.
The AI doesn't think of the forge as a production building, it thinks of the forge as a building with +25% production, -1 health and +X happy. If asked to build a production building it'll look for things with production modifiers on them, if asked to build a happy building it'll look for things with happiness modifiers - a forge will work for both (assuming appropriate resources).
In short, the code looks *only* at modifiers, there are no "building classification" in the XML. It's mega flexible in that way, which is one of the reasons why drydocks are(were) troubling, it just looks at modifiers and there's nothing particular troubling about +4 domain-specific exp (bear in mind the barracks is a +3 domain-specific exp build!!! in the original code the barracks looked like a cheaper and weaker drydock!).
Buildings are the modifiers they provide, nothing more and nothing less.