Patty, There are so many different aspects to your question, and so many different circumstances that could affect the answer. I ran a Service Dog program for several years, and we had volunteer foster families who helped train the dogs. We were using shelter dogs in the program. Transferring owners can be difficult for some dogs and no problem at all for others. German shepherds tend to bond tightly to a single owner and thus find these changes hard to take. Goldens and labs typically love everyone (and especially anyone who feeds them!), and while they might miss their foster family and be overjoyed to see them again, they usually handle the transition easily and quickly bond with their new owner. This is one reason most service dog programs have moved from using shepherds to goldens / labs. But remember there is huge variation in dogs, and many other factors come into play when the transition is made.
Another aspect is the training and support that the kids receive while they have the dogs. What are they being asked to do with the dog? How long do they typically have the dog? Do they just give it a loving home for a while? Teach it some basic manners and obedience? I would hope that they are being supervised and that the dog is learning skills to make it more adoptable.
Finally, what is the alternative for the dog? Living in a temporary home is going to be far less stressful than being in a kennel at a shelter. So sometimes we settle for less than ideal situations in order to avoid what we know will be a bad situation.
Finally, sometimes dogs choose their owner regardless of who has raised and cared for them. I worked with a prison program that trained service dogs for a while. We were doing initial placement with a seizure alert dog who had been with an inmate 24/7 for almost a year. The man she was to be placed with was coming for his first evaluation with the dog. When he walked in, the dog left her inmate handler and went directly to the man. She never left his side or looked back after that. I’ll never be able to explain it, but she knew at first sight that this was her man and she was responsible for him. He never even had to look at her or speak to her. So sometimes, nothing that has come before matters to the dog.
This was a long answer to a short question, but I hope it helps!
Riggan