ATMs don't scan a deposited check or cash. They wait for someone in the bank to open it and determine whether it is legit, then the account is credited. But after a while your account becomes "trustworthy" and any deposits are credited to the account before it is checked.