The story about this idiom
齐大饥,黔敖为食于路,以待饿者而食之。有饿者,蒙袂辑履,贸贸然来。黔敖左奉食,右执饮,曰:“嗟!来食!”扬其目而视之,曰:“予唯不食嗟来之食,以至于斯也!”从而谢焉,终不食而死。曾子闻之,曰:“微与!其嗟也,可去,其谢也,可食。”
-------选自《礼记·檀弓下》
A famine broke forth in Qi State. Qian Ao, the generous landlord, was providing rice to the hungry. A hungry man covered his face with sleeves and staggered along. Qian Ao had food and soup, shouted to the man, "Hey, here! There's food for you!" The hungry man looked at Qian Ao and said, "I will never eat the insulting food and that's why I am starving! " Qian Ao was shocked and apologized. However, the man did not eat food and starved to death. Zeng Zi learned this story and said, "The hungry man didn't not need to die. When Qian Ao shouted to him, he could just leave. And after the apologize, he could eat."
learn Chinese idiom - 嗟来之食.
In Chinese opinion, one should have backbone and never yield to a conqueror.