Before the modern year-round dairy operation came about in the twentieth century, dairy makers were bound to following the natural milk producing rhythms of their herd, which meant that copious amount of milk were available in the spring and summer for butter making due to the birth of calves and the availability of fast-growing pasture. With this surge in milk production came the opportunity to produce butter, however, dairymaids had to contend with problems presented by the warm weather in these seasons. In times before refrigeration was available, humans had to devise other methods of preserving butter so that it would be available during the winter months when cows were producing significantly less milk. In the warm weather months, butter could not be left alone at ambient temperature or else it would begin to culture into a very sour, acidic product due to the natural bacteria present in it, as well as due to the milk proteins.
The most common method of preserving butter was through salting or brining it, which would allow it to be stored for several months. This method involved a vigorous rinsing, washing, and pressing method in order to cleanse the butter of any residual buttermilk (which contained milk proteins that would lead to the butter souring). The butter was then packed firmly into scalded tubs in layers, with heavy salting in between layers in order to preserve the butter. In the winter months, when it was time to eat the butter from the spring and summer, one would remove a chunk of salted butter from the tub and plop it into a container with cool water to leach the excess salt from the butter.
Salted butter was also used as a method for preserving other foods as well in well-to-do households that could afford to spare butter for such a purpose. Generous swaths of butter were spread over cooked food as a sealant to prevent spoiling, and pies were doused in a thick layer of butter to increase the longevity of the pie. Other fats, such as lard and tallow, were also used atop foods in jars in order to create a seal that would allow the food to be preserved for weeks or even months without refrigeration.
Such practices as mentioned above were largely popular among European dairymaids, while Eastern dairymaids largely opted to turn butter into ghee, also known as clarified butter, which is stable for long periods of time at room temperature. Ghee is created by slowly boiling butter, allowing for the milk solids and proteins to settle to the bottom of the pan, and then carefully pouring off the purified fat for storage and later usage. Without the milk proteins the butter oil is shelf-stable, which came in handy in warm climates, such as in India.
Khosrova, Elaine. Butter: A Rich History. Algonquin Books of Chapel Hill, 2016.