There are different factors. One being accuracy of the scale, then there is loss of weight due to moisture loss, and also there are greedy companies. It can be any of theese(or a combination of theese)
While companies are greedy, there's no need to misrepresent their product when they can just do shrinkflation instead without a lot of consumers noticing.