The protests in Egypt as well as Turkey are a symptom of a wider struggle between the modernism and reactionary Islamism. Both Morsi and Erdogan are pushing an authoritarian Islamic agenda despite the objections of more liberal factions in society.
However both of them won free and contested elections in order to obtain power. They have democratic mandates. There is a similar clash between authoritarian populists and a liberal middle class in other countries in Thailand and Russia.
In other words liberalism and democracy are in direct opposition rather than being bedfellows as is widely assumed. In the west we have developed a system of more or less pluralistic, liberal democracy but we only got here hundreds of years of a slowly widening franchise-. If we had enjoyed full democracy from the 17th Century onwards when the country was populated by superstitious peasants then we probably would not have that.