You're asking an overly simplified question about a complicated problem.
In regards to the gold side issue of it, people generally purchase gold as an investment vehicle as protection from diminishing purchase power. This DPP can be caused by hyper-inflation, people loosing trust in the fiat currency and abandonment of fiat currency. The inflation figures that are posted by the US government aren't very accurate because as mentioned previously they don't account for a whole bunch of shit.
You're also not comparing apples to apples, CPI is not calculated the same everywhere.
In regards to the gold side issue of it, people generally purchase gold as an investment vehicle as protection from diminishing purchase power. This DPP can be caused by hyper-inflation, people loosing trust in the fiat currency and abandonment of fiat currency. The inflation figures that are posted by the US government aren't very accurate because as mentioned previously they don't account for a whole bunch of shit.
You're also not comparing apples to apples, CPI is not calculated the same everywhere.