The glass transition is a change in the physical properties of a material, from brittle and ‘glassy’ to ‘rubbery’, or soft and viscous. If you gradually heat a hard, brittle plastic, it will eventually become soft and malleable. The temperature at which this occurs is called the glass transition temperature.
Many polymers (including the cellulose that makes up the structure of the cell walls in a coffee bean) are slightly elastic below their glass transition temperature. This means they will change shape under force, such as the force generated by steam pressure building up inside the bean. However, if you take away that force, the elastic structure will bounce back to its original shape. But if you push them too hard, they will snap.
When its temperature exceeds its glass transition temperature, the structure is softened, so under the same force, it will stretch a lot farther and may permanently change shape. This is why, for example, a polythene bag is stretchy — the glass transition temperature of LDPE is around -100°C, so it is flexible at room temperature (Greene 2021).
Complex polymers may have multiple transitions at different temperatures, corresponding to the transitions of different parts of the polymer structure. Cellulose, for example, has transitions at around 220°C, 175°C, and 17°C (Ioelovich 2016). The structure of a coffee bean, which is made from multiple complex polymers, has multiple transition temperatures, each resulting in different changes in the bean’s physical properties.
Water is an effective plasticiser for cellulose and other polymers in a coffee bean (Pittia and Sacchetti 2008). Its presence makes the polymer structures softer and lowers the glass transition temperature. The primary glass transition of wet cellulose is below room temperature — this is why your shirt gets wrinkled when you wash it. Once the shirt is dry, the glass transition temperature is much higher,