I am not sure where the qty is getting pulled from for the variable products.
I assumed its was a total of all the variations but its not.
Eg. I have a product that shows 563 left in stock on the category browse page when you click on the product
I have 6 Colours (Variations) with the below qty
Beige – 222 In Stock
Black – 470 in stock
Brown – 254 In Stock
Yellow – 4796
Grey – 462
White – 3266 In stock