Except that they do... That's how banks make money. With interest. They lend it as mortgage or as T-bills lending it to the government.
Just look at the balance sheet of SVB
You're talking about buying bonds as "lending to the government" which is a pretty odd way to describe it, but it still isn't the bank lending to clients, which creates new deposits and a matching loan asset.