A quarterback could stay in the pocket and still get the ball to someone. In today's game, there is an increase in zone-blitzing. With the zone, there is always a potential for coverage and nowhere to throw. There may also be a guy coming free from the pass rush but there is no way to get rid of the ball by staying inside the pocket. Being mobile allows a quarterback to get out of the pocket and run or find a guy down field who has come free.
Mobility also puts added pressure on the defense.
The defense does not have as much control of the pass rush. It adds another thing that defenses have to worry about. With a quarterback who stays in the pocket, defenses do not have to worry about the quarterback running and has the pass rush under more control. A mobile quarterback also can help the running game. With the worry that the quarterback may run, the defensive ends and linebackers have to stay home and watch out for the quarterback running a bootleg.