Echoing Goombah via similar testing: Without looking at the code, it appears to be something related to the rotting mechanic.
Spawned a bunch of 10 stacks (That is to say, 10 of each) of all kinds of foods, both perishable and non perishable. Began transferring the perishables to a locker through AIM. Once all perishables were transferred I continued with the non perishables, as this was happening I noticed the list was getting shorter with each transferred item and perishables in the locker inventory listing began disappearing one by one with each press of the enter key. An unusual thing I noticed as I was transferring perishables is that with each press of the enter key, the single 10 stack of chunks of meat I initially transferred slowly began unstacking one by one until there were 10 separate listings of chunks of meat in the locker. I also noticed that this did not happen immediately with the 10 stack of tins of mushroom soup and I suspect the reason is the difference in total shelf life before rotting between raw meat and tinned perishable foods.
To be sure I also spawned 10 stacks of misc items: ammo, matchbooks, lighters, etc etc. None of these items are affected in any way, it’s definitely only items that can rot.