Why do LEGO sets always come with extra pieces?

The main reason (as LEGO claims) is that LEGO does not have 100% confidence in its ability to pack small parts accurately.

Most LEGO items are packaged in small plastic bags, and these are automatically calculated based on weight. But small parts are difficult to weigh and require more precision. It’s easy to know if a really heavy piece is missing, but it’s hard to say if a really SMALL piece is missing.

The LEGO solution to this problem is that, for most elements lighter than a certain threshold, they include an additional element of this type per small bag, which leaves you a few extra bits at the end.

That said, there are sets that do not come with small pieces that fall into this category. In particular, games such as DUPLO or Juniors sometimes have no extras: This set is supposed to have no extra room at all (and I do not see anything on the list that could normally be considered an extra, so I think it’s okay).