Short answer: Yes, dry beans go bad, it just takes a long time.
Longer answer…If you’re storing beans in a reasonable location (dry, sealed off), dry beans are unlikely to get moldy, even after years. It is possible, so check for any weird looking beans before cooking them.
The issue is that over time, dried beans become harder to cook.
The older dry beans are, the longer they take to cook. Some have guessed that they lose their ability to soak up water. If your beans are too old when you cook them, they won’t soften much and will have an unpleasant texture.
So while eating dried beans that are a few years old is perfectly safe in most cases, they probably won’t taste as good. Ideally, try to eat them within a year at the latest.
How Do You Know if Dried Beans Are Too Old?
The most obvious sign is mold. You’ll see it, and likely smell it right away.
The other sign would be that they don’t expand as expected when you soak them. If you’ve soaked them for 12-24 hours and they still aren’t fully hydrated, the beans are “too old” and should be thrown away.
It’s a shame, but at least dried beans are cheap to replace.