Typical motors draw more than 40 mA (or require something other than 5V) so we can't drive them directly from digital output pins. With a simple transistor you can use a digital output pin to turn a motor on and off (and with PWM control speed) but you can't reverse the motor. To do that you need an H-Bridge which is what the Motor Shield has. This allows control of both speed (PWM) and direction (H-Bridge) and has drivers for higher currents and voltages.