How does bread soften cookies?

At work, a pal of mine brought in some cookies, but they got hard/stale after a few days. So he tossed in one slice of white bread, and the cookies were very soft the next day.

In pursuit of the answer, I learned that a slice of bread will also soften those terrible bricks of brown sugar that form over time. But how does it happen?

      • I’m not quite sure of the exact chemistry, but it’s something about that the yeast in bread has a weaker attraction/bond with water than the sugar does.
  • It works to soften old marshmallows also. - DougC

or,

you could place the stale cookies in the microwave (beside NOT in) a saucer of water and nuke them for about 10-20 seconds.

works well