It's nice to see you posting your concern in the QuickBooks Community. I'll make sure to provide how QuickBooks transactions work in the system.
The Undeposited Funds account keeps a record of payments in QuickBooks until you physically deposit the same payments at your real-life bank. That said, it holds invoice payment and sales receipt you want to combine. It's not recommended to leave all undeposited funds as is in the system.
You have to deposit them first because undeposited funds should be zero if all payments are received. This ensures QuickBooks always equals your bank records so to prevent any errors when reconciling.
Here's how to deposit:
Click + New.
Choose Bank Deposit.
From the Account dropdown, choose the account you want to put the money into.
Select the checkbox for each transaction or the receipts you want to combine.
Make sure the total of the selected transactions matches your deposit slip.