Honey lasts a very long time. So why does the lid matter?
Yeasts and molds are tiny living things that spoil food. They need water to grow. Honey normally has too little water for them.
But honey soaks up water from the air. In an open jar, that water can let yeasts and molds grow. A tight lid helps keep that water out.