Crying lowers stress for whatever complex neurochemical reasons. Could be an accident of evolution.
Babies can’t talk, so it’s probably a way to communicate to the parents and illicit an instinctive response.
Eyes are important for survival, and also susceptible to debris and damage. Babies are inexperienced and explore and experiment with their surroundings in dumb ways. So if a baby is hurt or upset, it might make sense to flush the eyes out just in case. If an eye irritant is the reason the baby is upset, the cost of a few tears is very low compared to the value of the eyes.
A lot of animal behaviors emerged via evolution because they “just work” in certain situations in the wild. They don’t always make a lot of sense to us today, sitting indoors in front of our screens. But they worked well enough for some scenarios to carry forward.