https://en.wikipedia.org/wiki/Egyptian_presidential_election...
2) Mubarak was also forced to resign by the same military council in February 2011 and the military council ruled until June 2012 when morsi was elected, it just wasn't called a "coup" and "military dictatorship" back then by the western media.
Stalin and many (most?) other dictators also have staged elections. From the article you linked:
----
Of the 30 proposed candidates, only 10 were allowed to participate in the presidential election by the Presidential Election Commission. One prominent candidate not allowed to run was Talaat Sadat, the nephew of former President Anwar Sadat, who appealed his disqualification unsuccessfully.
Egypt's largest Islamic group, the Muslim Brotherhood, was not permitted to field a candidate ...
----
And also:
official results showing he won 88.6% of the vote. Mubarak's opponent, Ayman Nour, of the Tomorrow Party, is estimated to have received 7.3% of the vote and Numan Gumaa received 2.8%,
Numbers like that are unseen in any legitimate election. The highest in U.S. history was 61%.
That's not surprising since the US doesn't make election day a public holiday.
1) Mubarak was an unelected dictator; he was replaced by a democratically elected government.
2) Morsi was democratically elected and replaced by a military dictatorship; thus it was a coup.