i think the real value of the investment into food is ... when there is none to buy.
yes... food prices go up. but if you factor in the costs and time to build your storage, to buy jars, shelfes, buckets etc. ... plus, if you try to increase shelf-life even more: vaccuum-sealer-bags, mylar-bags, oxygen-absorbers, moisture absorbers etc. ... then the return on investment (ROI) won t be that big.
i think, a big factor is to buy when it s very cheap (coupons, season, sales, factory-sales, bulk etc.) and store until you need it. if your food spoils, then your ROI goes down.
it s important to learn how to conserve and store. and to store only what you eat. and to rotate.
but i think, the prepping for times when there is no food or less food, is a very big factor/value of the ROI in storing food. think about things like inflation, job-loss, economic crisis etc. if that happens, then the real value of the investment into food will become visible.
and: if you learn to cook from scratch with your stored foods, that will normally be much cheaper than to buy prepared foods or to eat-out or to order food. so there is a real saving in actually using your pantry...
EDIT:
https://www.backdoorsurvival.com/six-enemies-of-food-storage/ ... maybe this article is helpfull for someone. it has good links to other articles. this site offers a free ebook on food-storage when you subscribe to the newsletter. you can cancel that subscription later. the e-book will cover some basics and might be a good start for beginners.