This is not really true. Most web sites and activist groups warn against the harmful effects of all behavior altering substances, be they legal or not. The focus may appear greater on illegal substances because while the harmful effects of alcohol and tobacco are widely established, the harmful effects of street drugs are fraught with inconsistencies and innuendos. This is mostly because of the ethics issue in studying people who use illegal drugs not because these drugs are less harmful than alcohol or tobacco.
It is much harder to control a study on the use of illegal drugs than it is to control one on legal substances. For example a study on the use of alcohol can be controlled with informed consent, age restrictions on participants, validation of the study subject and tight manipulation of confounding variables. Most importantly you can control the potency and/or dosage of the alcohol used in the study. This is not true for street drugs.
Even if such a controlled study on street drugs were ethically possible (which it is not in North America), it would still be easily dismissed in practice since there is no regulation of street drugs. This means that while studies can set out guidelines for per ounce effects of certain concentrations of alcohol and these can then be applied in practice, the uncertainty surrounding the potency of street drugs makes this impossible. With street drugs the potency of a drug can vary greatly even if you get it from the same source and call it by the same name. There is no regulation and therefore no practical way to apply any studies.
Studies on harmful effects of street drugs have had to rely on things like self-regulation by subjects, self-reporting of confounding variables, and doses that are not standardized or the same across subjects. These studies are almost always incidental, where a group of existing users volunteers and is then monitored by way of questionnaires and sometimes medical tests. These studies rely heavily on the truthfulness of the subjects and are vulnerable to honest under-reporting of use by subjects who underestimate how much they have used or who are unable to accurately assess the potency of the substances they have used. The results of such studies are normally correlational which leaves them wide open to interpretation and attack by those groups that do not like the results. So the reason so many sites seem to focus on the harmful effects of illegal substances may simply be a matter or exposure to established facts.
In everyday life, on the evening news and in current events classes, teens may discuss the harmful effects of legal substance and may trust that these effects are based in facts. These discussions are less likely of illegal substances, and when illegal substances they are discussed the lack of controlled studies leaves the door wide open to selective interpretation, misinterpretation and blatant dismissal of harmful effects. If teens are warned against street drugs more often than legal substances it is likely because of the inconsistency of the information you may hear about them and the lack of agreement on the facts by pro- and anti- factions.
Even people who smoke cigarettes are quick to acknowledge that they are harmful; this is less true of people who smoke marijuana. Pro-marijuana activists often state that marijuana is less harmful to the lungs than tobacco even thought the most dangerous substances exist in both and they are both inhaled. This is typical of the problem; street drugs are still surrounded in mythology while the legal ones are not as quickly defended as safe or safer, even by regular users.