Sat in the back on an Alaska flight to Hawaii and they ran out of food a couple rows before me. Felt like a bad MBA optimization - save $20 on food by under buying at the cost of periodically making a few passenger unhappy for a 5 hour flight.
Same thing happened to us, also on a flight to Hawaii. Except we sat near the middle of the plane. We had to feed our two young kids using various snacks and cheese plates.
Seems like there is a systemic failure - their food oversubscription system doesn't correct for a fact that on a six hour flight almost every passenger will buy food.