They're basically used as you say to replace things like eggs and milk. The whole point of that from the industrial perspective is to save on cost, they weren't removed on health grounds. It was pointed out in a BBC documentary recently that most supermarket ice cream is now so shelf stable that if it wasn't for rats and mice which love the sugar, it wouldn't need to be kept frozen at all during transport because of all the emulsifiers.
In any case, the whole distinction around UPF vs non-UPF is the addition of ingredients that would not form part of a human diet typically. The thread above me was basically saying all ice creams are full of UPF ingredients and then someone's counterpoint was that there's plenty of good choice of non-UPFs. My point was that even things that "look" non-UPF often are. Whether UPFs are good or bad is up for debate and discussion although countries that consume a lot of them generally have much worse health outcomes.