There's a lot of things you don't get to know before signing a contract to purchase a house—as a buyer, you don't get much information about the electrical system (did the seller actually know what he was doing on that DIY work, or did he just grunt and claim to know?), the plumbing (are there roots in the sewer line, or is the sewer line broken?), the heating and air conditioning system (why is the carbon monoxide detector beeping?), or many of the other systems which make up a house
Simply put, a buyer cannot not sign a contract to purchase a house—a buyer can only sign a contract to purchase what he or she believes a house to be. If the buyer believes that all of the systems of a house are in good condition—and bids accordingly—then the buyer deserves to know if the house actually is what he or she believes it to be. There's a lot of money on the line.
That's not the same as “making sure that everything is okay.” Not even close. Making sure that everything is okay requires that everything is okay to begin with, and even then there's still a catch: the definition of “okay” varies from one person to another. A buyer's definition of “okay” is almost always higher than that of anyone else involved in a real estate transaction, and that's why inspections are an important part of real estate transactions. Whether everyone else in the transaction is honest, a crook, or simply ignorant of their merchandise, the satisfaction of the buyer should be the goal of every real estate transaction, and an inspection can go a long way towards ensuring that satisfaction.