Boiled milk can curdle in metal jugs due to a reaction between the milk's proteins and acids with the metal, especially if the jug has scratches or is made of reactive metals like aluminum. This reaction is accelerated by heat.
Milk contains proteins (like casein) and acids (like lactic acid). When milk is heated, these components become more reactive. Certain metals, particularly those that are not completely inert or have damaged surfaces, can react with these proteins and acids. This reaction destabilizes the milk's structure, causing the proteins to coagulate and the milk to curdle. Aluminum is a common culprit, as it can leach into the milk, especially if the jug has scratches or imperfections in its protective coating. The heat from boiling accelerates this chemical reaction, making curdling more likely. Stainless steel is generally more inert and less likely to cause curdling, but even stainless steel can react under certain conditions, especially if it's low quality or has been damaged.
To prevent milk from curdling, use a high-quality stainless steel or glass container for boiling. Avoid aluminum or scratched metal jugs. Also, heat the milk gently over medium-low heat, stirring frequently to prevent scorching and uneven heating, which can also contribute to curdling.