Why do nuts and grains go bad?

Even if they don't get moldy, nuts and grains can go bad. Why is that?

May 4, 2021 - Live Science
Even if they don't get moldy, nuts and grains can go bad. Why is that?