When the 'Continue selling when out of stock' setting is enabled on the admin side, products can still be added to the cart even if their quantity is 0.