They are not given to induce vomiting (although sometimes they do). They are given to adsorb chemical poisons that have been ingested and so prevent them from entering the body.
Tablets of activated charcoal are still used as a folk remedy and over-the-counter drug to treat diarrhea, indigestion, and flatulence.
They were also used in the past by doctors for this purpose....