Well, it doesn't!, Kosher and sea salt has an indefinite shelf life. They are likely to last forever if they are stored properly and kept free from contaminants.  Although they might change color, it's still safe for use even if that’s a telltale sign of spoilage.  On the other hand, iodized salts with additives like table salt may not last that long —the highest 5 years.