When people recommend legumes, they're not normally talking about peanuts. It's like people recommending fruits aren't normally talking about tomatoes.
Note how peanuts and bacon have similar caloric densities, yet black beans, brown rice, oats, and corn are much much lower? These are the legumes and whole grains parent is likely talking about, not peanuts and whole wheat bread.
Note how even chicken breast and light string cheese are twice as dense as than those whole grain products.
Note how high water content fruits and vegetables are king.