Alligation answers one question: in what ratio must two ingredients be mixed to reach a given average? The ingredients might be grades of rice at different prices, acid solutions of different strengths, two groups of students with different average marks, or two parts of a stock sold at different profits. In every case there is a cheaper value (c), a dearer value (d) and a mean value (m) somewhere between them.
Quantity of cheaper : quantity of dearer = (d − m) : (m − c)
Each ingredient's share is the distance of the other ingredient from the mean. If the mean lies close to the dearer value, you need a lot of the dearer item and only a little of the cheaper one, which is exactly what the rule gives.