Encoders are often added to DC motors to remedy their greatest weakness: controllability. Normally a DC motor will blindly spin as fast as it can for the power being provided. Without an encoder, you can only control the power being provided to the motor from -100% to 100%. With an encoder, you can actually measure how fast the motor is moving, even when it encounters external resistance or when it stalls. With some clever programming, you can create control loops or logic to precisely control the position or velocity of your DC motor.