What happens to a baked good when you leave it out on the counter overnight?
Actually, the answer to that depends on which baked good we're talking about. If you left a slice of bread out overnight, or maybe a bagel, it probably hardened. On the other hand, if you left a crunchy cookie out, like a ginger snap or a graham cracker, it probably became soft.
Why would some baked goods do one thing in the open air, and other baked goods do the opposite?
Not surprisingly, the solution to this mystery lies in the different ingredients that make up the two types of food. A hard cookie, like a ginger snap, is likely to contain a pretty high concentration of sugar. Sugar is what a chemist would call hygroscopic. That means that it is inclined to attract water out of its surroundings, or in this case, out of the air in your kitchen. The dense texture of the cookie helps to hold in whatever moisture is attracted. The reason cookies come in sealed packages is to keep atmospheric moisture out, and keep the cookies hard.
Bread, on the other hand, has less sugar than the cookies, and it has a more open structure. Because it's not very hygroscopic, the moist bread is free to lose it's water molecules to the kitchen air by evaporation. Without this water, the molecules in the bread's starch grains lock together, making the bread stiffer. When bread comes sealed in a plastic bag, it's to keep the moisture inside, preventing it from evaporating.