In BB's translation of the Majjhima Nikaya, at MN 124.41, his note to the sentence, "Then, seated in the midst of the Sangha of bhikkhus, the venerable Bakkula attained final NIbbana" (p. 988), says, "[The] Majjhima Nikaya Attakatha [commentary says]: Ven. Bakkula entered into meditation on the heat element and attained final Nibbana by causing his entire body to be consumed by that blaze. Only the relics remained" (p. 1338).

That sutta is quite interesting; it's the only one I can recollect just now which includes chorus refrains as well as the text proper. Because of this, I'm inclined to see this as something of an early hagiographical piece, and with that the commentarial choice to give the event some bells and whistles seems par for the course.

"And how is it, bhikkhus, that by protecting oneself one protects others? By the pursuit, development, and cultivation of the four establishments of mindfulness. It is in such a way that by protecting oneself one protects others.

"And how is it, bhikkhus, that by protecting others one protects oneself? By patience, harmlessness, goodwill, and sympathy. It is in such a way that by protecting others one protects oneself.- Sedaka Sutta [SN 47.19]

2 important background facts that could help explain what Ven. Bakkula did. He was around 160 years old at the time the sutta takes place (Bodhi's note [1167]), and he attained Arahanship on the 8th day of his going forth (Bodhi's note [1170]). So an arahant at 160 years of age would easily know the exact timing of his death and all he did was simply to save his fellow monks the heavy tasks of cleaning up a dead corpse as noted in [1172] by Daniel above:

[1172]MA. he had considered that all his life he had never made himself a burden to the other bhikkhus, and he did not want his body to be a burden after his death. THus he entered into meditation on the heat element and attained final Nibbana by causing his entire body to be consumed by the blaze. Only the relics remained.