Cooked rice is offered to crows during rituals dedicated to the departed souls. The belief is that pitrs or dead ancestors and relatives in the form of crows come and eat the rice offered. The story as to why crows have the right to eat the rice offerings is found in the Uttara Ramayana.
Legend has it that once a king named Marutta performed a huge ritual named Maheshwara Sattara. Indra and all other demigods attended the ritual. Yama, the god of death, was also present at the function.
Ravana, the demon king, who heard about the assembly of the gods, visited the ritual with the intention of attacking the unarmed Devas.
Devas who came to know about the arrival of Ravana and his army fled the ritual arena assuming the forms of different birds.
Yama took the form of a crow and escaped from the area. Yama was pleased with the crow form.
He then gave crows the boon that when humans worship the departed souls with rice offerings, the crows will have the right to eat the rice.