Gold bars in storage may not degrade, but code in storage doesn't degrade either. We know from context that we're talking about code put to use. Gold bars are quite prone to degradation when put to use as well.
You do realise that if I were to win then the five gold bars would be gone in the wind and you'd be ponying up for another five to pay out on the wager?
A white elephant needs a living are, food, elephant experts, vets, etc. That's much closer to the type of asset most code is.