Times have certainly changed. I was born in 1967, so I remember the '70s and '80s, and back then going to the pediatrician was much different, than I imagine today. Since I don't have kids, I don't know what happens when you take your child to a pediatrician.
From the women I know who have kids, the doctor doesn't undress the child nor check their genitals, once the child reaches puberty, the genitals are checked once without the parent in the exam room. If it is a sports physical, the Doctor normally goes to the school and does the exam, or the parent has the option to bring the child to the office for a sports exam, but the parent is not in the exam room.
Back in my day, nudity seemed to be common. Everyone I knew walked around their home in undies. For the boys it was undies (tightly whities) and a T-shirt and for girls a T-shirt and panties. This was common from the time you were an infant to teenagers and adults. Nobody thought it was creepy. We just did it without being embarrassed. Boys and Girls would hang out in their undies and sleep in their undies as teenagers, and some even nude.
When you went to the doctor's office, a parent would be in the exam room, and the nurse would have you undress to your white undies (hanes for FTL). No matter the reason why you were there, the doctor would always examine your genitals. For me it was embarrassing because my penis was sensitive, while sitting and waiting for the doc, I would start getting an erection and during the exam, my penis would be erect and when it was time to examine my penis, the doctor seemed to take a long time. As my penis would be exposed, throbbing and me being nervous my mother would watch since the exam rooms were small and she had a clear view of the doctor taking out the tanner stages, palpating the shaft of my penis as he would hold the base and feeling my frenulum which always made me ejaculate.
Many of the boys and girls that had the same doctor, had similar stories of this certain doctor and when I told my mother I felt uncomfortable, she just told me that is what doctors do. To me it was normal, but I didn't like it. He also gave my mother brochures about male puberty and growth in teen boys. But after that, everything changed, were I had to wear my undies around the house and to sleep in, plus I was placed in this "growth & development" study that I had to go to the doctor every 90 days for him to examine my development which I didn't understand. Then my mother would perform home inspections on me as well and during the development exams, she would tell the doctor and give him an update on my progress which I questioned and didn't understand. Several boys in my town had very similar experiences with the same doctor and his procedures.
Back then, parents and attitudes are much different. Nobody got arrested, nobody claimed child abuse and things were done by this doctor that was so unethical that he never got into trouble.