This is wrong. The grocery store are only responsible if the food they sold was toxic because of something they did to it (such as left it on a shelf after its expiration date). An issue like allergen contaminants in your favorite snack is definitely not something the grocery store would be liable for.
And in-app purchases are not toxic. They're perfectly reasonable. People who like them include developers. If Apple didn't give this ability to developers you'd probably be hearing more people complaining about how awful Apple's walled garden is to content makers, further restricting what their apps can do. Furthermore, while some users don't like in-app purchases, many other users enjoy them because it allows them to get additional content without having to get a whole new app. Each app has its own overhead. What takes up more space on your phone? Multiple versions of your favorite game, or 1 version of your game with some in-app purchased plugins?