Polyethylene-coated cartons are designed to be recyclable, and I suspect that the environmental impact of people who don't offer those for recycling is lower than the environmental impact of putting stainless steel into rubbish dumps.
Glass is very recyclable, but there are additional transport costs associated with the weight and volume overheads of glass containers compared to PE-coated card, and broken glass is more dangerous than broken card.
Milk has a limited use time because there will be bacteria in it, regardless of the packaging used to contain it. Milk which has been filtered to remove (some) bacteria is available (e.g. sold as Cravendale, but even that has a limited lifetime). UHT milk is perhaps not the same product as normal milk, depending on what it's going to be used for.
Bulk transport of milk is done in stainless steel tanks which are cleaned between uses: the re-use of a milk-tanker is pretty-much guaranteed.
Overall, it is cheaper to use PE-coated cartons than any other package for small volumes of milk.