Would they not have been better off keeping Mubarak?
In hindsight, perhaps. It was the military that had the real power under Mubarak, it was the military that had the real power under Mursi, and it is the military that has the real power now. So nothing really changed. However, people sometimes get these irrational ideas of things being able to change, and given enough numbers they might act on those ideas. That doesn't mean they will change the thing that actually needed changing...