ERC20 transfer_from()

Hello,

In this implementation https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5cdf2a8fdf50448d3d51c0a0e615d27b430765d9/contracts/token/ERC20/ERC20.sol#L158

why transfer function is executed before checking allowances ?
It is possible that transfer happens successfully but the allowance was not permitting that transfer.
Could someone please explain?