This is a quote from the book "On Zero Confirmation Transactions" by Chris Pacia
...detect double spends and thus prevent almost all fraud attempts as long as our code is up-to-date with the various differences in miner policy.

But opponents of zero confirmations t
ransactions envision a dystopian world in which would-be fraudsters pay miners higher transaction fees to ignore the first-seen rule and include double spends in their blocks, essentially aiding in the fraud. In such a scheme, a thief could leave the store with the merchandise, then find a willing miner to help them defraud the merchant and replace the valid transaction with the double...
read full book block explorer