Is this still the case with used items? Anyway, it still doesn't explain away the example given above. The item was originally five quid and replaced by the same item costing seventeen, before me realising and going back to aquire the same item for a fiver from the same supplier.
Items can come and go from stock quite quickly, I've had stuff in my basket that has changed price repeatedly over the space of several hours in the past, as well as come and gone from in stock from the supplier.
IIRC people selling via amazon tell the system how many they've got "in stock", and amazon will automatically note it's out when that number reaches zero, but depending on the seller they may then update their listings within minutes or hours, by which time Amazon's system has already noted they've run out and updated your basket with the message.
You tend to notice it most when there is something that is either in high demand, or a particular seller has a really good price for it, I've long since learned if I see a bargain linked to amazon and it's out of stock to check again a few times over the space of the day.
For example there was a backpack at £5 instead of £60 being sold by a retailer through amazon, it was in stock, out of stock, back in stock, out of stock, back in then sold out completely in the space of about 2-4 hours (I suspect the retailer only put a small number up at a time to avoid having all their stock tied up on Amazon rather than their own website)