Why? the two are generally unrelated. Lack of food isnt the bottleneck, there is no shortage. It is usually a host of complex problems.
Is throwing away water in a rainforest immoral when there are thristy people in a desert? The problem is connecting the two.
"the two are generally unrelated"
This is some truly bizarre logic. The perfectly good food being thrown away can be given to the hungry for free since the company is saying it has no value if they are willing to throw it away. You seem to be intentionally misunderstanding this basic logic.