And yet it wasn't a very good asset to hold between 1980 and 2000, despite quite high inflation during the period. It's nominal value barely moved while real value of USD halved.
Gold isn't really held because central banks expect its value to go up always. It's held because its safe from other risks like assets being frozen, the currency completely collapsing to 0, etc. Gold has managed to always hold "some value" over centuries. It's a hedge.