Doors are such an important invention that multiple unrelated animals have evolved modified body parts to serve as doors to burrows¹. Being able to store food is critically important for surviving low-food periods like winter without migrating. "Indoors" lets you store food without insects or other animals getting to it & stealing it. Fire allows for hardening clay, which lets you make a special tiny "indoors" called a "pot" for storing food. Also bricks so "indoors" can be made anywhere. With a roof the rain stays out & you can stay dry & warm, and not freeze at night. A significant portion of why fire is so important is it enables creating various sorts of "indoors".
> "Indoors" lets you store food without insects or other animals getting to it & stealing it.
This isn't true of human doors; insects are very small.
We've had the technology to keep things in wax-sealed clay jars for quite a while, but I'm not aware that this was done with grain, where preventing spoilage would have been most valuable. Granaries are open to the air. (And devote quite a lot of effort to slowing the spoilage of the grain.)
If you wanted food that wouldn't rot, instead of keeping it in an airtight environment, you dried it.
Every different food idem needs to be stored differently. There sometimes more than one option that will work, but you cannot treat everything the same.
If I have to survive the night, overhead protection and thermal insulation is more important than a fire. Source: I've tried using both without the other.