It's not legally yours. Usually they will figure out the error and debit the account. But sometimes not. Maybe somebody with bad handwriting filled out a deposit slip. If you were to wait until the statute of limitations expired (three years or more) you would be entitled to keep the money.