Why would anybody in their right mind buy treasuries when the interest rate doesn’t keep up with cost of goods/services?

Because most people in the world have seen USD/Treasuries INCREASE IN VALUE vs goods/services in their domestic economy.

Why?

USD has appreciated more vs local currency than local prices have increased.

This is one of the hardest thing for American investors to get their head around.