The formation of Mallory bodies is linked to cellular stress and injury, particularly in liver cells. Factors such as oxidative stress, inflammation, and protein misfolding contribute to their development. When hepatocytes are exposed to toxic agents like alcohol, the stress on the endoplasmic reticulum leads to the accumulation of abnormal proteins, which then aggregate to form these bodies.