Beans are legumes (family Leguminosae). Most legumes have symbiotic relationships with nitrogen-fixing bacteria in their root systems. As a result legumes like beans are often used in organic agriculture and permaculture as a replacement for (the nitrogen component of) artificial fertilizer.
This study models a global scenario without synthetic fertilizers, which assumes "20% of legume crops in crop rotations, i.e. a legume crop every 5 years".