They’re durable, resistant to corruption, relatively rare, pretty… Titanium or gems would’ve been equally used if they were equally convenient. Not to mention that coinage could be minted or mixed with, say, copper. Gold makes good alloys and can be recovered later.