For example Google tells me chicken breast has 30g of protein per 100g. My chicken breast I bought says on label 21g of protein. I wonder if they test this? And why such a big discrepancy. Perhaps if the chicken was raised in batteries instead of outdoors, it has less protein?
discrepancies happen often. This might be due to being cooked vs uncooked, water content changing, different foods being compared, different amounts being compared or just natural differences between seasonal food.
They don’t test it. USDA provide them with averages based on the breed & age of the animal that come from NIST. The label is better than the generic “chicken breast” USDA publish which is an average across all.
Actual values for what you are eating will be +-20% for what’s on the label.
Pasture raised chickens will have more protein and less fat then battery raised but still within this 20% margin. Main reason to get pasture raised is that it tastes better.