Transactions at self serve pumps are often offline, so the card will say this person is good for certain amount of money. After you’ve filled up, the transaction is sent to your bank and taken from your account. Transactions in the store are often online, so a request is sent over the internet to your bank to check if you have available funds. Online transactions have to go through various networks and be processed by software so it takes longer.
Source: I implemented a debit card system for a bank.