Note that although the A77 does have a mechanical shutter, it also has an adjustment to pre-open the mechanical shutter, and just use an electronic shutter to start a picture. This reduces shutter lag (by a large percentage, but it's already normally short enough to be mostly imperceptible) and noise, which can be handy if you're shooting things like weddings.
Edit: as to why you have both electronic and mechanical shutters: you need an electronic shutter to do video. The mechanical shutter is way too slow and noisy to be suitable for shooting video.
For fast action you just about need the mechanical shutter though. An electronic shutter (on a CMOS sensor) takes around 1/50th to 1/60th of a second to read the data from all the lines in the sensor -- enough to visibly distort fast-moving objects.
The mechanical shutter can do somewhat the same thing, but reduces it from 1/50th of a second to 1/250th. That's enough shorter to eliminate most visible problems.