In addition to @ballardw 's comment, there is another important difference between WHERE and IF - namely that where will outsource the filtering to the data engine, while if only filters once the data observation has been passed to the data step. This data engine might be the sas engine for various types of sas datasets, or a database for which sas/access has an engine (see SAS/ACCESS Software Access Engines).
The fact that where-filtering is outsourced is not only why you can use where in your proc freq's, proc reg's, proc sort's, etc., but it also can make the where statement (compared to a subsetting if) a more efficient filter in a data step.