Puppets can actually stunt your ability to grow your empire. If you selected Theocracy within the Piety social policy tree, reduces happiness in UNOCCUPIED cities by 25%. Let's follow this to its logical conclusion. If you puppet a city (it's now occupied), and it grows to size 12, you now have 15 unhappiness (3 from puppeting and one from each population. Now annex it, and build or buy the courthouse, and you actually add happiness to the empire. The four maintenance for the courthouse is easily made back with the population working good gold-producing hexs.
I had this situation occur in a recent game. I had +3 happiness. When I annexed the city, it dropped to -6 happiness. I bought the courthouse, and it increased to +6 a net of +3 happiness for 600 gold. I had a few other puppets with similar population, but I had to save gold for the several puppets I had. I don't exactly understand the mathematics, but those are the numbers. Granted, it costs quite a bit of gold to purchase the courthouse, but if you need the happiness, which is common if you expand in the late game and can afford the cost, annex and build courthouses in your higher population puppets.