No, it's because demand for food is inelastic.
Free market theory is useful for getting general ideas for how doing X or Y might affect the economy, but once you're talking about the actual economy made up of actual people, you need to forget it, because "free markets" that actually follow those simple rules directly are effectively nonexistent.
In this case, you don't even have to go so far as to say the theory is wrong, because it lays out certain conditions for what can be considered a "free market", and elastic demand is one of those.
> they couldn't raise prices in the past because people would get too mad at them
They didn't raise prices before because they believed people would get too mad and they'd lose money.
Due to a fairly complex combination of factors, that's no longer true.
Some of those factors are the increased consolidation of nearly every part of our economy, meaning that there are vastly fewer players in a given sector that would have to defect in order for this to stick; the (relatively speaking) massive levels of political and economic turmoil the US (and the Western world more generally) has suffered over the past several years, leaving people much more numb to stuff like this, at least in the short term; and the number of people willing to sit there and justify their actions for any of a wide variety of reasons. (And yes; the supply shocks of the pandemic that actually justified raising prices are a major factor, and were clearly the trigger for this—the thing that either gave them the idea, or showed them that it might work.)