Precisely. Moving units to instant-purchase with gold instead of production with hammers would break the game, and would massively devalue industrial buildings.
No it wouldn't....
If Production could get Turned Into Gold,
Industrial buildings would still be necessary.
Essentially production-> Gold is the same as
production->military units
if gold is primarily used as a military resource
exception is that you wouldn't have committed to a Particular unit.
A way around that,
Units are Basically Free, but they are produced with 1 hp, and you need to maintain them long enough to heal them up
So Building a Warrior is instant, but you need to put the gold and Time into 'reinforcing' that Warrior
Spamming isn't a problem (at least not in a city because it is 1 upt, you don't need to attack each unit in the stack to kill the stack)
Spamming also isn't as much of a problem (and Industrial buildings are important) if Cities need buildings to build units.
What if building a unit in a city with a Barracks makes it come out with a +50% Strength modifier... What if building anything besides a basic Warrior required a building.
You might still "Spam" units (except units are supposed to be Expensive this time around, how many Warriors would you spam in Civ 4 if you could buy them for 30 Gold, and they cost 3 gpt to maintain... and your Palace didn't provide commerce?)
But the "Emergency defender" would still probably be a waste, since all your cities are already defended.... do you want to spend a bunch of your military resources on a city you will either Lose anyways or keep anyways?
I'm not sure why an AI would have problems...
whenever the AI decides it needs more units it buys units
If its gold reserves are low, it increases its production->gold
If it has plenty of gold reserves, then it cuts down on production->gold