Think about it; You are using tunnel vision to just see the part you usually eat. Think about green beans. They are beans in their whole form with the 'seeds' inside(like all fruit). All beans start out like this until processed. They are a fruit. Musical fruit. You do not believe what you read? That's not my words, it's from the encyclopedia.
green beans are the beans inside ,but you also eat the 'shell', and called green beans , like in some cases peas, green peas...most cases you 'shell' them...even though the entire plant is called peas, the peas are the seeds....