If I’m looking for the motivations of the coup and the rioters, I’m going to look at what they and their propaganda said.
So, you fully believe that the reason that the democratically elected government of Egypt was overthrown because "The president's speech last night failed to meet and conform with the demands [of the people]"? Couldn't possibly because the military wanted to seize power, could it?
The rioters believed the election was fraudulent;
Maybe, maybe they just didn't want to admit they lost. Do you think Trump believed the election was fraudulent? That's what he said, so it must be true, right? Everyone's justifications have to be taken at face value, and there can't be any other possible reasons for what they do. All coups are launched for fully benevolent and altruistic reasons, just as they claim!