Elections do not always return a government that has true popular support; the system may be gerrymandered so it is much easier for one party to win seats. Additionally in many democracies there is a large number of people who don't vote so even a party that is elected may not have a true mandate. If the abstaining majority want a different government should the military not respect their democratic wish?