Shopify only knows what you tell it. Returns that never went back on the shelf, damaged items set aside, picking mix-ups and receiving typos all move the number in your admin away from what is on the shelf. When it drifts too high, you sell stock you do not have; when it drifts too low, products show as sold out while units sit in the stockroom.
Fixing it product by product in the Shopify admin is slow, and filling Shopify's inventory CSV by hand from paper count sheets brings the typing errors back in.
Shopify can update inventory from a CSV import. What is missing is a clean list of barcode and counted quantity that you can merge into that CSV.