Ethanol contains less energy per unit of volume than gasoline. This reduced energy density means that replacing a volume of gasoline with ethanol reduces the overall amount of energy which can be extracted, lowering mileage.
On the other hand ethanol has a higher octane rating than gasoline. Octane is a measure of how much heat and pressure the fuel can take before igniting itself. If you are trying to get more power out of an engine you want to push as much fuel and air into the cylinder before igniting it in order to get a bigger bang. There is a limited amount of volume within the cylinder though and if your fuel explodes before it is compressed to the right point your engine tries to spin backwards and generally destroys itself.
So higher octane means more compression is possible and a bigger bang, meaning more power output. Ethanol has a higher octane and so using more ethanol in the mix allows those greater levels of compression. You do end up using more liquid volume so your mpg goes down, but performance goes up if you tune the engine to use it.
Latest Answers