There are two reasons why we need to use a L293D chip in this project. The first is that the output of the Raspberry Pi is nowhere near strong enough to drive a motor directly and to try this may damage your Raspberry Pi.
Secondly, in this lesson, we want to control the direction of the motor as well as its speed. This is only possible by reversing the direction of the current through the motor, something that the L293D is designed to do, with the help of two control pins.
The project fits nicely on a half-sized breadboard.