You are considering this issue in an inverted way. The issue is not whether a democratically elected government would have been better, it is whether an unelected autocratic government is providing significant benefits that would justify it.
It may or may not have made a noticeable improvement, we don't know. However, what we know for sure, is that the coup did not bring any noticeable improvement. So why impose an autocratic corrupt and illegetimate regime, with all the flaws that are attached to it, in particular the absence of accountability and counter-powers, if it doesn't bring any improvement? The answer is quite obvious!
On top of it, what you and a few others are unable to grasp, is that the democratic process is a learning process. It took time in Western countries to develop acceptable democratic systems.
This learning process simply cannot happen if it is regularly interrupted by coups which are replacing corrupt elected politicians by corrupt unelected autocrats. It could have happened if there had been no coup. Yingluck may not have been re-elected.