I've done a lot of research on this topic and I've find an answer:
yes and no.
It's called diversion, and there's a long explanation as to what that means but I want to give you the shortened version. Basically, a diverted product is one that has made its way from the manufacturer into the gray market, then finally hits the shelves of the drug stores.
It's not necessarily illegal, at least, it isn't for the drugstores. Someone along the way broke their contract with the manufacturer which could leave them in trouble with the law.
It definitely isn't safe. Diverted products, since they are not guaranteed (check out the back of most professional products to see the warning), don't have to be held to the same standards as the ones on the shelves at your salon. Most of the time they are expired and moldy, but there have been some products found that are completely different from what the bottle is advertising, creating a hazardous product for your hair and general health.
So stay away. Not only are the diverted products harmful to you, but they are devaluing the professionalism of the product and the industry. Don't buy diverted products or return the ones you've already bought.
Have you ever bought a diverted product? Did you even know there was a difference? Tell him in the comments below.