I would guess there are a number of factors in play here.
1) the dog has been in the shelter, shut up in a small pen for nearly the whole day. Before that, she may have been crated for long periods by her former owner. Her muscles are weak due to lack of exercise.
2) kennel cough and being spayed have weakened her further.
3) (and this is THE most important factor!) You would not believe how many posts we see on here about German shepherds with weak back ends. It's because of the way breeders are breeding them. They breed for such a long upper thigh, and so much angulation that the dog's hind end can barely support it. As a matter of fact, I've seen GSDs in dog shows that actually NEEDED support from the handler in order to hold a stack!
Exercise will help, of course, but increase it gradually so as not to stress her joints and muscles too much. Walking on the beach is good, if you are near a lake, as beach sand won't stress joints, but the dog has to work harder to walk on the soft surface. Swimming is excellent exercise too, as there is NO impact to harm the joints, which is why it's often used to rehab dogs that have been injured.
If you want to learn more about shepherd structure and the problems caused by overangulation, Leerburg has an excellent article: Leerburg Dog Training | Balance Problems With the American Show German Shepherd
Linda Shaw's book, The Illustrated Standard of the GSD is a wonderful resource too, if you can get your hands on a copy! Some of the pages are available online: http://www.vtgsd.com/publicgsdfiles/...epherd-Dog.pdf
Unfortunately, the preview doesn't include the pages where she discusses the angulation of the hind legs.