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.