Customers agree to this when they accept the terms of the app. This is also how a debit or savings account at any bank works. Both businesses have sophisticated models to determine how and when customers are likely to make withdrawals, and based on these models they lend out the money based on acceptable risk criteria.