The Market building is a building which was NOT seen in the original game or in the Steam version.
It's a building where you can literally trade any resource for another . . . but at certain (set) proportions. You can imagine how useful this building could be if you struggle to keep resources balanced. (Or it can help "protect" you from a mission failure due to being one timber too short for your first sawmill, for example.)
Below is a table which shows the "market trade values" (where what you see in the top row is what you get from trading what is in the left column).
You can also see me explain a similar char in a segment of a video I made for playing a special single player mission in KaM Remake, r6720 which actually REQUIRES you to use the market. (Note r6720 and r5530 are the only acceptable remake versions to do speedruns with! Any later versions will be rejected!)
And, although the original KaM Remake Developers (Lewin and Krom) created the Market building, as you can see both in this article itself (and in the comments), they discourage heavy use of the market. Because it's more efficient to create a resource the default way. https://www.kamremake.com/devblog/how-do-we-know-market-prices-are-right/ However, in select maps (like Two Sides mentioned above), the market is REQUIRED to use (and even exploit) in order to win. Krom and Lewin meant that, if given a choice to use the market or not to produce a resource, only use the market to balance resources. But you are doing yourself a disservice if you want to try to replace default production chains with a "shortcut" through the market.