There are a couple of reasons to wash new clothes once before you wear them for the first time. One is to remove or diminish the chemical finishes that manufacturers put on clothes to make them look better, and the other is to rinse out excess dye.
Finishes won't bother everyone who puts on a new pair of pants, but there are some people with sensitive skin who could develop a rash. Babies' clothes should always be washed before they are worn because babies can be particularly sensitive to chemicals. New clothes that have been washed once will be softer and that makes them more comfortable to wear.
One common question that many people have at this point is, "Wouldn't it be better if the clothing makers didn't put any extra chemicals on new clothing?" One common reason to apply chemicals is mildew. Clothes that are made of natural fibers, such as cotton and linen, can mildew if they are exposed to moisture. Manufacturers use formaldehyde to treat clothes that have to be shipped a long way, say, from Asia to the United States, to prevent mildew.
Formaldehyde has a very sharp odor, and sometimes new clothes that carry formaldehyde-based resins will give off a pungent smell until they are washed. Formaldehyde is also blamed for allergic reactions in sensitive people. If you are a person who suffers from allergies, it is a good idea to wash your new clothes once before wearing them. You won't wash the finishes out completely, but you will reduce them somewhat.
Another tag that appears on clothing suggests that you "wash separately before wearing." The clothes that carry this tag often have dark or bright dyes that could run off on other clothes or even on your skin. Washing these items once before you wear them will get rid of the excess dye.