there are no additives in it that make it last that long, so it can’t be unhealthy because of those. it’s just heated to at least 135 degree C which kills any microorganisms in it. it still retains 85% of the vitamin content (fresh milk has 95%, raw milk 100%). Only B12 and folic acid are really affected by that. Nothing unhealthy about it
The expiration date is only while the carton has not been opened. As soon as it’s opened it will only last 3-6 days before it goes rank. Bottling and sealing the milk in a sterile environment helps to keep it fresh for longer as this minmises the amount of bacteria floating around.