All dressed up in riot gear and nowhere to go. Such was the plight of two dozen Thai police officers stewing in boredom Sunday night near one of Bangkok’s busier nightlife districts.

Thai elections tend to be anarchic affairs for the keepers of order, with protests often deteriorating into violence. This time was different; tear gas canisters sat unused after the victory of allies of Thaksin Shinawatra, who was ousted in a 2006 coup.

Yet the riot shields, clubs and guns may not be idle for long. It’s something investors pouring into Thai assets this week should consider. The assumption that political stability has returned to one of the world’s most chaotic democracies could be a costly one.

Optimism is the story for the moment. Southeast Asia’s second-biggest economy just held a competent election. Prime Minister Abhisit Vejjajiva conceded to Pheu Thai party leader Yingluck Shinawatra. The nation has its first female leader. This, as Thais were quick to tell me in Bangkok, is a moment for pride and celebration, not cynicism.

The trouble is, Yingluck, 44, still must overcome resistance from Thailand’s military, which is as coup-happy as they come. She must do the same with the courts and the bureaucracy as she tackles the prickliest issue of all: when and how Yingluck moves to return her brother Thaksin to the nation he’s been trying to run from afar in self-imposed exile.

Thaksin’s Return

That’s the real issue, and Thais will be assessing the risk that Yingluck moves too fast to repatriate her brother. Protesters and the military would snap into action and thrust Thailand back into crisis.

Much is forgiven when an economy scores high growth rates. In 2010, Thailand grew the fastest in 15 years. Yet governmental stability matters, too. The longer Thailand goes without it, the further it falls behind China. Just a decade ago, Thailand was a democratic oasis in a region of archaic autocrats. Today, it’s a political basket case.

That gets at a bigger question: Why is Asia’s democratic process so messy and, at times, violent?

Thailand is Exhibit A; political demonstrations last year alone led to 91 deaths. What Thailand and its 67 million people prove is that elections aren’t enough, says a new report from the United Nations Development Program, titled “Understanding Electoral Violence in Asia.”

Violent Elections

In recent decades, a view developed that untroubled contests were the ultimate prize. Yet, the report says, “seeing elections as a test of democratic development, rather than a goal in themselves, provides a better conceptualization of the processes that are needed to ensure free, fair and peaceful elections.”

Democracy is about what leaders do after the votes are tallied. The key is creating institutions to ensure competence and transparency, providing checks and balances to weed out corruption and cultivating nongovernment watchdogs to keep politicians honest.

The Philippines tends to fall prey to electoral violence. Journalists who dare to report on public corruption often pay with their lives. In Malaysia, Prime Minister Najib Razak is going all out to head off a political rally his weekend, tarnishing his nation’s image in the process.

Report Card

Thaksin personifies why Thailand’s record is so poor. It’s remarkable how popular he remains almost 5 years after he was brought up on corruption charges. Chat up the average taxi driver, bartender or food-stall worker and you will get an earful about how Thaksin, the populist, looked after the nation’s poor while Abhisit, the elitist, ignored them.

It’s easy to forget how billionaire Thaksin bent Thailand’s leadership apparatus -- government ministries, the courts, the bureaucracy and the military -- to his will to benefit his business interests. There’s no mystery why shares in the family media business, Shin Corp. Pcl, surged after Thaksin’s sister won the election. It’s widely thought that he will be calling the shots again, which would be great for Thaksin Inc.

If Thailand had built a robust political system, one where independent bodies existed to uphold its legitimacy, this would be dismissed as the stuff of conspiracy theories. Only it’s all too clear that Thaksin used his power while in office from 2001 to 2006 for personal gain. It’s not a coincidence that Thailand has slipped to 78th among the 178 countries in Transparency International’s corruption perceptions index, the same level as Greece, Colombia and Lesotho. In 2001, it ranked 61th.

The generals who removed Thaksin did themselves no favors by lacking a clear plan for their traumatized nation. And it’s not as if Abhisit’s party, which grabbed power and then governed in an opaque manner, was a big improvement.

Expectations for Yingluck are like those Americans had for Barack Obama in 2008. Thais expect her to end their political nightmare and put the economy on track to become the next South Korea, not the next Philippines.

That won’t happen if her brother pulls the puppet strings. At the moment, the odds favor that he will. Bangkok’s riot police may soon be back in business along with the Thaksin family.

(William Pesek is a Bloomberg View columnist. The opinions expressed are his own.)

To contact the writer of this column: William Pesek in Bangkok at wpesek@bloomberg.net.

To contact the editor responsible for this column: James Greiff at jgreiff@bloomberg.net.