The purpose of testing is to reduce risk. Any project includes a fair amount of risk. The unknown factors within the development and design of a project can derail the whole endeavour and more minor risks can delay the project or inflate costs to unacceptable levels. The purpose of testing is to reduce uncertainty and hence the risk in the project.
Testing and Risk Reduction
Testing and Test Planning in the Iterative Project Model (IPM)