system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why does putting a slice of bread in a jar of stale cookies work?

Baked some cookies this weekend. I went to get one a few hours ago and they were hard as rocks. I stuck the end piece of a loaf of bread in the jar, and now I'm enjoying a soft, chewy, and delicious cookie as I post this. As far back as I can remember, I've always known that trick works pretty consistently. I just don't really understand why...
gpt
In a word, humidity.

The bread's got a relatively high moisture content, and its porous texture gives a big surface area for exposure to air. Because of that, the water in the bread can evaporate pretty quickly until it's at equilibrium with the atmospheric humidity in the jar. And the cookies, in turn, are now less humid than the air... so that moisture content will be condensing on/in them faster than it's evaporating.

Basically, in a sealed environment like a jar, moisture will tend to find its way around until everything is about as humid as everything else.