One of the key attractions of molality is that changing the temperature of a solution does not change the molality, while it may change the molarity. This is because the volume of the solution changes as a result of expansion or contraction of the solvent upon changing the temperature, and thus the molarity changes, since $M=\frac{mol}{V}$.$$M=\frac{n}{V}.$$
The downside, of course, is that the amount of solute required to reach a given molality depends on the nature of the solvent; ambiguity may also arise when a mixed solvent system (e.g. a water-ethanol mixture) is used, as the choice of which compound is the solute changes the molality of the resultant solution.$^1$1 Molarity avoids this problem by requiring only the volume of solvent.
As for why it's introduced in school, that's a pedagogical question beyond the scope of this answer, but both molarity and molality have their uses in the laboratory.
$^1$Consider1 Consider, for example, a solvent made from 95% water and 5% ethanol. Molality could be determined with respect to only the water, or the combined water-ethanol solution, leading to different calculated concentrations.