OP is speaking to the market level effective demand.
Someone who's poor and starving will direct their own very limited economic purchasing power toward food. But the marketas a whole includes those who are wealthy (far fewer in number, but individually having vastly greater purchasing power), who might prioritise energy purchases generally.
It's not the poor's own food-vs-energy deceisions, but poor-food vs. rich-energy, which are in play.
Eventually, that effect should bring down the amount that energy companies want to pay for corn. But lots of people might starve first...