Once components have been developed and tested in isolation, they can then be integrated into larger units, and finally into the completed system. All during this process testing can be performed to increase confidence in the final system.
The earlier an error can be discovered, the easier it will be to fix, and the less impact it will have on the final system.