Kama, the God of love was destroyed when he shot his weapon at Lord Shiva to disrupt his long penance. Shiva opened his third eye, reducing Kama’s body to ashes.
For the sake of Kama’s wife Rati (the goddess of passion), Shiva agreed to restore Kama, but only as a symbolic force representing emotional and spiritual love rather than physical lust. The Holi bonfire is also believed to be associated with this event, and with the ushering in of love in the spring.
As the lust was won over by the Eternal Bliss of Lord Shiva the Kamadahana or Holi festival is celebrated as an event associating with the bliss of God. The Holi bonfire is in commemoration of this event. The ash of Kama’s body settled over the Lord Shiva.
The Kama dahana Murthi DhyAna shloka states, bhasma uddhULita vigraham.
So following Kamadahana during holi, people put the powders on themselves and others remembering this victory over lust. To this day, people offer sandalwood paste to Kamadeva to relieve him from his stinging burns and mango blossoms that he loved on Holi.