Resources are generated by cites (along with a few spells), and used to pay for upkeep costs, units and spell casting.
Due to the existence of output multiplying buildings, it is often best to focus each resource producing city to one production alone and maximizing it.
Races different from your starting one suffer from penalties on resource production (20%) and on city growth (which means less buildings over time). So, their advantage on regular terrain may not be that huge, even if significant. Using them, if possible, when a corresponding special resource is available is a no brainer though, because their output multiplying buildings apply to that resource as well.
Is it worth building a magic bazaar in undead mana-producing cities? It depends on their base output. Building the bazaar takes 5 construction slots (market, bats fort, tax office, vampire mansion and the bazaar itself), and one of them costs 2 mana to maintain. Those five buildings could be mana farms instead, bringing in a total of 5*4=20 mana. This means that your bazaar is only worthy if your city makes (or is expected to make in the future) at least 22 mana per turn without counting multipliers. In this case, the 100% bonus it gives can overweight the loss.