How do I get rid of plastic smell in rice / pasta?
If these were not food-safe/toy-safe bins, it is likely softeners/plasticizers from the plastic materials gassing out and migrating into the ingredients.

These can be phtalates or other petrochemical/organic compounds, and if in doubt, they are as unsafe in food as gasoline would be.

I certainly would not want to give anything that has taken on enough of that to smell of it to children, even if it could be prepared in a way that lost the smell.

If you discard it, you might consider doing so in a manner that makes sure nobody mistakes it for excess but safe packaged goods.

A lot of clear plastic bins you can currently buy ARE either explicitly marked as food safe (look for https://en.wikipedia.org/wiki/Food_safe_symbol, often engraved into the plastic), or made from the same material as common in these that are explicitly labelled: polypropylene, which, if not labelled, could still have some questionable additives, but plasticizers are generally NOT needed to make household items from that material. I still certainly would not use the non-graded stuff to directly hold unpackaged foods.

HDPE can be safe for similar reasons (questionable mold release agents), any PVC or Polycarbonate container that is not labelled as food safe very likely is not.