The toxicity of alkalies is mainly due to their ability to saponify fats and denature proteins, disrupting cellular structures and leading to tissue damage. This is particularly evident in the case of strong bases like sodium and potassium hydroxide, which can penetrate deep into tissues, causing liquefactive necrosis.