People investing in treasuries do not want your cash. Thayer had cash and spent it on treasuries. They want cash in the future to match their future liabilities.
There is a real utility to having a vehicle for investing free of credit risk.
Pensions are another investment where you need somewhere safe to "store" the money. Government bonds are one of those safe places. A quick search says US pension funds alone invest about $32 trillion (not all in bonds of course).
There is a real utility to having a vehicle for investing free of credit risk.