Why did the CIA back the coup in Egypt, that has ripped up the constitution (for democracy! hat tip BBC) and brought about an even more powerful dictatorship which has almost immediately afterwards allowed the Muslim Brotherhood to preach in Tahir Square and an Iranian gunboat and supply ship to pass through the Suez canal, two acts which destabilise the Egyptian relationship with Israel?
1. Mubarak refused to let the Iranian warships pass through Suez - which Egypt had not allowed since the Iranian revolution - because though this was a defensive move on Iran's part it was a military escalation to a war which Mubarak could only lose
A war with Iran would require Israeli use of the Suez canal for submarines. This would be unacceptable to the Muslim Brotherhood and they might mount terrorist attacks on canal shipping until the canal was closed. Mubarak could not afford to do anything to risk the flow of canal traffic because the average Egyptian currently spends 40% of their daily wage on food and would revolt against him.
So the first reason Mubarak was overthrown was because he opposed the military escalation of war against Iran. Stratfor reported that Israel backed the army's move into the Sinai against Mubarak's home on the Red Sea coast - temporarily breaching the 1979 Peace Treaty - which suggests both Israel and the US (CIA) supported the coup.
2. Mubarak suppressed the Muslim Brotherhood, the parent organisation to Hamas which rules in Egypt and attacks Israel
After stealing all the powers of the state the new Supreme Military Council has now done something Mubarak never did and allowed the Muslim Brotherhood to preach openly in the "revolutionary space" of Tahir Square in a way that destabilises Egypt's relationship with Israel. This destabilisation will happen because the Muslim Brotherhood is the parent organisation to Hamas which rules in Gaza.
Since the hardline military coup was backed by Israel and the CIA this destabilisation may be what they want - it gives them a reason to seize Suez during the attack on Iran. So the second reason Mubarak was overthrown was because he opposed the escalation of religious tensions with Israel that would make it difficult for Egypt to keep the Suez canal open during any Israeli conflict with Iran.
3. Mubarak supported the 1979 Peace Treaty with Egypt
The new Military regime has done at least three things that goes against the 1979 Peace Treaty. The first, before they got power, was moving the army into the Sinai, a move which had Israeli approval. The second, immediately allowing the new regime, which the Pentagon admit they had worked closely with during the transition, to let the Muslim Brotherhood spread anti-Israeli propaganda in Tahir Square. The third, allowing an escalation of the conflict between Israel and Iran by deliberately letting Iranian warships through the Suez canal, when they know they'll have to do the same for Israeli warships - or go to war with Israel or the propaganda spreading Muslim Brotherhood.
The Supreme Military Council of Egypt prevents the masses from revolting with a promise of democracy in the future which Mubarak could not give because he did not want a democracy (any more than the new lot do), and his promise would not have been believed anyway (as it wasn't). Meanwhile they are spreading anti-Israeli propaganda to sabotage any possibility the new constitution and elections will either 1. Happen or 2. Bring about a democratic regime.
Mubarak, though he was a bad ruler for the Egyptians, had to be removed because he was an obstacle to a war which US and Israel want against Iran. Mubarak didn't have any cards left to play after the stakes were raised, so he (was) folded, and the chips went to US and Israel.