how come yeast packages has expiration but they say when you harvest your yeast and put them into jar its good for a long time. Can someone answer my question cause I might have another question after this
Like other's have said it has to do with viability... But the part about harvested yeast AND even expired yeast is that you can build up through feedings of wort the remaining living cells into a viable batch of working yeast. The dead won't come back to life, but the stuff that is in there that is viable will eat the sugars you give it most importantly reproduce.
That's also why we can take a bottle conditioned commercial beer, even one that is years old, and havest the yeast from there, and grow it into enough to ferment a batch of beer.
It's the same principle as working with sourdough starters in bread making, you take some and build up more with that base of yeast.
One of the reasons they have a "best by" date is that a vast majority of brewers do not for many reasons make starters for their yeast, so as the yeast dies off it's conceivable that someone could pitch a yeast with only a few viable cells in it, which will be stressed out and try to ferment the beer and cause off flavors or just not work.
That's why we make starters. And that's ALSO why often you can get away with pitching let's say a quart mason jar full of year old back of the fridge harvested yeast (which I've done) and have it go nuts, because whereas a tube or smack pack may only have a small about of yeast to begin with in there, a quart is a lot of cells, and percentagewise, you're still going to end up with a lot more working cells in a jar than a tiny test tube.
But it still is better to make a starter with it.
But the thing that a lot of people don't seem to realize is that yeast are amazing and resilient creatures that can survive and singlemindedly do their jobs in the harshest of environments.
In fact the current strain of yeast called "Cry Havoc" of Charlie Papazian sat for nearly 20 years in a fridge. He had a jar of infected yeast, that he put away to study later, and forgot about it, and it got piled in the back of his keezer or beer fridge, forgotten. 2 decades later he stumbled upon it, and for ****s and giggles made a starter with it, not expecting much. To his surprise it worked, and when he brewed a batch of beer with it, he even found that not only did it work, but 1) the wild yeast that caused the infection long died out 2) and it made for an extremely crisp and clean beer.
People have also cultured yeast that was trapped in amber for thousands of year. And recently grown yeast and fermented beer in space.