Food security
If there is no food security, this is called food insecurity. One of the reasons for food insecurity is that there are special markets (like stock markets) for food (called commodities).  Like with other goods, supply and demand influence the price. Grains can also be used as a food for livestock, or the can be processed to produce biofuel. These resources are then no longer directly available as food. People can place a bet on rising (or falling prices), something that is called a future. External events, such as bad harvests, or wars also influence the price.