Really cute little guy.
There are several viruses and/or bacteria that can cause Kennel Cough (tracheobronchitis). We vaccinate against 2 - parainfluenza and bordetella. So even if an animal has been vaccinated against those two, they can still get tracheobronchitis.
It is correct that surgery, stress and many other conditions can compromise the immune system. Also, animals that go into rescues or shelters and are very often exposed to many communicable diseases and it's a race between the vaccine taking effect and incubation of the disease.
Doug, DVM