Bringing kids to see the pediatrician is never fun. By the time your baby has their second or third appointment, they have some kind of understanding that sh*t's about to get real. The terror begins in earnest when they actually see their doctor, and, in my experience, that doesn't change for years (unfortunately). Once they get a bit older, though, the doctor bribery begins, and it usually comes in the form of sugar. There are things every toddler thinks when they get free candy from their doctor, because we all know the candy is there to offset the poking and prodding they go through and hey, if it's not broke, don't fix it.
I'll admit that my firstborn didn't get to experience the joy of this early exposure to sugar. I actually held her back from having sugar of any kind until she was two, and even then, her intake was extremely limited. I'm a monster, I know. Now, of course, she's almost five and eats sugary treats more often than I'd like to admit. My son, lucky kid, had the benefit of being born second, and getting early exposure to all kinds of things I never would have given my daughter, because I'm a "seasoned mom," now. So yes, he gets lollipops at the doctor's office.
Since my son (and almost every single toddler) can't quit articulate their thoughts and emotions the way us adults can, I am left to somewhat assume what my son is thinking when that sugary goodness is offered to him. I'm going to settle with the following thoughts my toddler (and yours) is probably thinking when the pediatrician bribes them because, again, whatever makes those doc visit as painless as possible.