So if the FDA was supposed to stop this, why doesn't it?
The FDA’s stated goals in 1906 (it wasn't known as the FDA until 1930) were roughly the same as they are now: "[the organization] protects public health by assuring the safety, effectiveness, and security of a wide range of products, including prescription drugs."
Despite its lofty ambitions, the FDA was relatively toothless until 1962, when Congress endowed the FDA with some real power to ensure that drug companies didn't make false claims (otherwise known as lies) about their products' effectiveness, and to enforce penalties for any misleading statements or claims. Drug companies were finally held responsible for demonstrating "substantial evidence" for the effectiveness of their products.
Fast-forward to the 1980s: while Ronald Reagan was telling Americans to "Just Say No," the feds cozied up to the pharmaceutical industry, and relaxed their legal restrictions. Direct-to-consumer marketing (DTCM), what you probably know as "drug commercials," was first given the seal of approval in the US in 1985.