Technically speaking, it is not a coffee bean. Once you realize this, you recognize how often we refer to it as a bean.
It is understandable why we call the item that we grind in order to create a delicious beverage, a bean; It bears an uncanny resemblance to the beans we consume on a daily basis. And how often has anyone seen it in the wild? The closest most of us have come is a commercial with a dark-skinned man or woman gently caressing a reddish greenish fruit on a bush that cuts to a scene of the items that we know as coffee beans gently churning in a brass vat with steam rising. The following scene invariably is the curling steam emanating from a mug of dark liquid and a person inhaling with a look of bliss.
If we have learned anything in our lives it is that history repeats itself (but that is not important here) and that advertisements should not be a source of information because their aim is to sell not educate.

What we know as coffee grows on a bush. The fruit resembles a cherry, it ripens and is then picked. In our modern age, there is often a old-fashioned manual process and an automated process and there are pros and cons to both. The manual process is more expensive but produces better results because unfit fruit is left on the bush. There is some fermentation and the fruit is depulped. What is left is the pit and that is the important part.
As with many things, the more automated, the less variation. Small batch growers and roasters take a more personal approach to ensure that the final product is delicious.
Remember that it is pit, not a bean. The coffee pit is sorted and selected . The coffee pit is then roasted. The pit might be kept with pits of the same origin (single origin coffee) or combined with pits of different origins to create a blend. The pits might be roasted lightly or end up as a dark roast, depending on the desires of roaster.
And, there you have it. The misnamed coffee ‘bean’ is actually a coffee pit. Consider yourself better educated than the average coffee drinker, but don’t let that go to your head. The most challenging aspect of having this knowledge is to avoid correcting everyone around you and sounding a pedantic bore. Although it could be worse, you could sound pompous minikin by using the word, pedantic.