Fermented foods can still spoil.
Fermenting is kinda a “controlled spoiling” where you let the food get infected with a germ that you know is safe. This will keep other germs out for a while, but after long storage your original germ can die and be replaced by something else that is less benevolent.
How long that takes is hard to predict and depends on how you store it. So the expiration date is kinda a “at least lasts this long” estimate.
In Australia we have Best Before and Used By
BEST BEFORE means it’s pretty much guaranteed to be the same as when it was packed but you can eat it and sell it after that date
USED BY means it can’t be sold (heavy fines for sale of products past their used by dates) and shouldn’t be consumed after that date as it has the potential to have been spoiled.
Anything that has living organisms in it ( hasn’t been dehydrated or pasturised) has the potential to rot/spoil and cause illness, hence the USED BY dates
Latest Answers