This is a quote from the book "On Zero Confirmation Transactions" by Chris Pacia
...er. Ideally what you would like to do is broadcast the valid payment, leave the store with the merchandise, then broadcast the double spend. The problem you have is every miner (from the very be
ginning of Bitcoin through today) has been programmed to accept the first transaction it sees as valid and reject subsequent double spends. If you wait until you are in your car driving away wit
h the merchandise to broadcast the double spend, all miners will reject it.
read full book
But here’s where things start to break down. While every miner is programmed to use this “first-seen�...