Due to the special nature of Shabbat or Yom Tov, one may not generally exert himself on those days to feed an animal that does not depend on him for food (Shulchan Aruch 324:11, since they can be assumed to be able to find food on their own as they usually do). There was a custom of some Eastern European Jewish communities that became the source of controversy based on this law. On Shabbat Shira, when the Parasha that contains the Song of the Sea is read in synagogue, they would scatter wheat kernels outside for birds to eat. The custom is recorded as early as the seventeenth century by Magen Avraham (324:7). Aruch Hashulchan (324:3) writes that the custom is based on a folk tradition that at the splitting of the Sea of Reeds when Moshe and the Jewish people broke out in song after the Egyptian’s dramatic defeat, the birds participated in that song. We demonstrate gratitude to them for this participation by feeding them. Magen Avraham writes that this custom is not correct, based on the law cited above, and his view is adopted by prominent contemporary authorities (see, for instance, Mishanh Berurah 324:31, and Kitzur Shulchan Aruch 87:18). This is also the sole opinion cited by a popular contemporary halacha book (Ribiat, D., The 39 Melachos, p. 447). The practice does, however, have its defenders. Tosefet Shabbat (cited by Aruch Hashulchan, ibid.) justifies it in a very general way by explaining that it is allowed since the intention is for the sake of Heaven. Aruch Hashulchan himself condones the custom by redefining the effort involved in feeding the birds. He writes that since it is done for the religious purpose of commemorating the joy of the Song of the Sea, the effort is not for the sake of the birds but rather for us and our benefit (ibid.). Even if this custom has fallen out of practice, and even if it may not be halachically acceptable, its essential idea – the celebration of a miraculous and epic event in our history – is still at least as relevant as ever.
 A topic that requires further study is whether the arguments in this article would apply equally to the sister-custom of tossing pieces of bread to fish at Tashlich.