It wasn't really a bug. Copies are reserved for a few minutes once a user clicks "check out", and only get removed from inventory when checkout is completed. Since items are still technically in inventory, but reserved, you can add them to your cart even when you can't actually initiate a checkout. If you happen to click "check out" after another customer backs out and releases their reserve, you can get an order through. That's why some people report success after clicking check out multiple times. Eventually they get lucky and catch one coming off reserve.
The best we can do is make sure people understand that adding an item to the cart is not a guarantee that its theirs. There would be a whole logistical can of worms if inventory was removed before checkout was actually completed and due to that, no eCommerce platform works that way. We could create a better queue like PAX has but even then I get the option to buy tickets that aren't actually in stock so that would not be a be all end all solution. There just isn't a super clean way to do this.