I've been wondering how companies that sell pharmaceuticals as "research chemicals" get away with it?

Do they import raw powders and just mix it up here? Or are they synthesizing them here and selling them for research purposes? I would guess they're imported from China considering the inconsistencies these companies all seem to share.

What's the law on this? How is it that they can do this without being shut down?