Having a home inspection is important because it can be used as a contingency in your purchase offer.
For problems large or small, you can ask the seller to fix them, reduce the purchase price or even give you a cash credit at closing to fix the problems yourself - this is where a home inspection can pay for itself several times over.