Probably just extra precaution since newborns aren't fully developed.
http://www.biometric-solutions.com/iris-recognition.html
"The iris begins to form as soon as the third month of gestation, by the eighth month the structures creating the iris patterns are largely complete however pigment accretion can continue during the first postnatal years."
Iris scanner uses near infrared spectrum which is used by TV remotes since at least the 1980s. Furthermore, anything that emits heat such as sun, fire, lighting, heat lamp, camera flash, etc. emit infrared and probably at higher levels.
The LED emitter used is IEC 62471 safety standard certified and there are measures in place to limit exposure according to Samsung but with any technology you don't want to abuse it.
(Note 7 but should be similar or same for Galaxy S8)
https://news.samsung.com/global/everything-you-need-to-know-about-the-galaxy-note7s-iris-scanner
Q. There’s a red light that flickers when I use the iris scanner. What is it, and isn’t it bad for my eyes?
This red light is an infrared LED, and it enables the best range for iris scanning to ensure maximum accuracy. It is completely safe to use and there are no health implications associated with the technology. It has even received the highest International Electrotechnical Commission IEC62471 certification level.
In addition, the light will automatically switch off if the device detects that your eyes are too close or exposed to the IR LED for more than nine seconds.