Dear student,
This is because the beans and peas are the leguminous plants or the crops which show a symbiotic relationship with the nitrogen-fixing bacteria called as rhizobium which play an important role in fixing the atmospheric nitrogen from the atmosphere into the soil. Thus, increases the fertility of the soil by replenishing the nitrogen back to the soil. Hence, farmers grow these crops in nitrogen deficient soil.
Regards