And for their final surprise, the Chinese laughed.
Formally ending an Olympics that was as much mystery as majesty, the host nation unfolded its arms, threw back its head, and howled.
There were silly flying drummers, a human tambourine composed of thousands of shimmying women, and chugging unicyclists rolling giant glowing circles.
There were guns shooting confetti into the stands, gymnasts bouncing on stilts, and Power Ranger look-alikes soaring up and down on ropes just for the heck of it.
In the closing ceremony Sunday, after two weeks of an Olympics that was run as sternly as the thousands of soldiers who guarded it, the Chinese finally let that guard down.
They allowed athletes to break human barriers and run around the National Stadium screaming and waving what appeared to be bottles of booze.
They allowed David Beckham to kick a soccer ball into a crowd.
And, oh my, they even allowed Jackie Chan to sing.
"Through these Games, the world learned more about China, and China learned more about the world," said Jacques Rogge, International Olympic Committee president, in his closing address.
Those giant booms that filled the National Stadium throughout the night were not only fireworks, but Rogge's sighs of relief.
Placing one of the world's most important celebrations of brotherhood and peace into the hands of an authoritarian government was the biggest gamble in the history of the Olympics.
But the risk was worth it. The Chinese pulled it off.
With clockwork precision forged by armies of money (at least $40 billion) and volunteers (endless swarms), these Olympics worked better than any in the modern era.
There was none of the usual competition controversy, none of the common logistical nightmares. The Games ran so smoothly that local troubleshooting officials eventually canceled daily news briefings with no complaints because, well, there were no complaints.
"These were truly exceptional Games," Rogge said.
They were also exceptional, however, for containing a political backdrop that was contrary to the very ideals that the Games promoted.
Even as it was drawing worldwide praise for its Olympics, the Chinese government drew a stinging rebuke from the U.S. Embassy on Sunday after it refused to release at least 10 foreigners -- including eight Americans -- being detained for staging Olympic protests.
"We are disappointed that China has not used the occasion of the Olympics to demonstrate greater tolerance and openness," the embassy statement said.
But somehow, the actual sports once again rose above the muck, the Games not only surviving, but flourishing, with the only controversy arising from sports pages and their charts.
So who won the medal race?
Chinese newspapers ran charts that ranked the countries based on gold medals. In that race, China won, 51 to the United States' 36.
Most American newspapers ran charts that ranked the countries based on total medals. In that race, the U.S. won, 110 to China's 100.
Not that China's chart is right, but, well, China's chart is right.
When it comes to every other professional sport -- and the Olympics are a professional sport -- Americans don't count second or third place, so why now?
The real winners here were the fields of play, which were strong enough to provide some small measure of comfort even after an off-the-field tragedy.
On the first full day of competition, at Beijing's historic Drum Tower, Todd Bachman, father-in-law of U.S. volleyball Coach Hugh McCutcheon, was stabbed to death by a deranged man who later killed himself.
On Sunday, after the grieving coach eventually returned to his team, the inspired group won the gold medal with a stunning victory over Brazil, after which McCutcheon disappeared to a private room to grieve.
The Games also provided redemption for another U.S. competitor who, at one point in his career, seemed beyond redeeming.
Two months ago, Kobe Bryant was criticized for being unable to lead the Lakers to the NBA championship.
On Sunday, he scored 13 points in the fourth quarter against Spain to carry a shaky U.S. team to an Olympic gold medal, after which he led the team in a whooping playground shout from the podium.
Maybe in that fun closing ceremony, the Chinese showed that they really did learn something from the rest of the world.
Maybe they watched U.S. swimmer Michael Phelps shouting and fist-pumping his way to an Olympic-record eight gold medals.
Maybe they watched Jamaican sprinter Usain Bolt do his joyful dance after three gold medals, proving that lightning does strike in the same place more than once.
Whatever, when it came time to wave goodbye Sunday, the host country did so with what seemed like genuine sharing and joy.
Maybe the Chinese are truly sorry the world is leaving what will be remembered as one of their great global achievements.
Then again, maybe they're just glad to get rid of us.
Bill Plaschke can be reached at email@example.com. To read previous columns by Plaschke, go to latimes.com/plaschke.