Hidimva's son also, I have slain by the employment of means, viz., through Karna with his dart. If Karna had not slain him with his dart in great battle, I myself would have had to slay Bhima's son Ghatotkacha. From desire of benefiting you, I did not slay him before. That Rakshasa was inimical to Brahmanas and sacrifices. Because he was a destroyer of sacrifices and of a sinful soul, therefore hath he been thus slain. O sinless one, by that act as a means, the dart given by Sakra, hath also been rendered futile.
Indra created Ghatotkacha so that Karna uses his dart on him.
Indeed, it was the illustrious Indra who created (by lending a portion of himself) the mighty car-warrior Ghatotkacha as a fit antagonist of Karna of unrivalled energy, in consequence of the dart he had given unto Karna (and which was sure to kill the person against whom it would be hurled).'"