Temperature increase with altitude through the stratosphere because "The ozone layer is found in the stratosphere".
Stratosphere is the second layer of the atmosphere of the Earth. 20% of the mass of the atmosphere is found in this layer.
The temperature of the stratosphere increases as the altitude increases due to the presence of the ozone layer in it as the ozone layer absorbs the ultraviolet radiations of the Sun which causes an increase in the temperature of this layer.