Olive fruits contain oleuropein, which gives them a bitter taste.

An excerpt from the article 21 facts about olives

Oleuropein belongs to the coumarin derivatives. It is present in every part of the plant, although its concentration can vary considerably from one part to another. The concentration of oleuropein in young fruit can be as high as 140 mg/g. Oleuropein acts against viruses, bacteria, fungi, molds, and parasites. It can also inhibit platelet aggregation.