The 'doctor' reciting side effects verbatim was a requirement put in place by the gov't after the drug companies started advertising a lot. The drug companies, of course, complied, albeit grudgingly.
The drug companies advertise because it makes them money. A lot of money. Patients see the ads and when they go into their docs, they ask for those by name (I've had patients ask me for specific brands of contacts that they've seen on TV or in print ads, for instance), and the doc is more inclined to write the Rx for that specific drug if it's indicated for that patient's condition. That ends up costing all of us more when we have to pay for these prescriptions, however. Note that doctors don't get money from prescribing certain companies' drugs--in fact the gov't has some very strict rules in place on what kinds of things drug companies can even hand out at conventions or in meetings at docs' offices (we're lucky if we get a cheap pen at a conference).
The one thing that is beneficial about these ads is it's made it easier for patients to talk about certain subjects with their docs (erectile dysfunction, mental illness, and other sensitive subjects), and it's educated people on some important subjects like osteoporosis and menopause.