The difference in behavior between dry baked goods, such as crackers or hard cookies, and soft baked goods like bread or cakes when they stale is primarily due to differences in their moisture content and structure.
Dry baked goods like crackers or hard cookies contain very little moisture to begin with. As they are exposed to the surrounding air, moisture from the environment starts to migrate into the baked goods. This moisture absorption causes the starches in the baked goods to absorb water, resulting in a loss of their crisp texture. The moisture softens the dry texture, making them feel stale or less crunchy.
On the other hand, soft baked goods like bread or cakes have a higher moisture content compared to dry baked goods. When these soft baked goods are exposed to the air, the moisture within them starts to evaporate gradually. As moisture is lost, the structure of the bread or cake undergoes changes. The starches in the baked goods crystallize and the proteins undergo a process called retrogradation, which causes them to firm up and become denser. This leads to a hardening effect and a stale texture in bread or cakes.
It's worth noting that the specific composition and ingredients used in different baked goods can also influence their staling process. For example, the presence of fats or sugars can affect moisture retention and impact the rate at which the baked goods go stale.
In summary, dry baked goods become soft when stale because they absorb moisture from the environment, while soft baked goods become hard when stale due to the loss of moisture from their structure.