When you add items to your bag it doesn’t mean the item is reserved. The items will be available for anyone to purchase until you have checked out, paid and you order has been confirmed. So, on occasions an item can sell out while you are shopping.
If you receive an error stating you cannot checkout due to an item being unavailable, you will need to remove this item from your bag so you can complete your order.