T-Bonds tie up money for a long time, bank deposit are largely retrievable on demand. Banks take a fee for bundling lots of deposits together to invest and depositors trade upside for convenience.
If you know you have a 10-year horizon, by all means buy treasuries instead of depositing at a bank.