Fresh from the tree, olives taste extremely bitter. The reason is oleuropein, a polyphenol that protects the fruit from pests. Before olives reach the plate, they therefore have to be debittered.
Traditionally they are soaked in water or brine for weeks to months, fermenting as they do. Industrially, lye speeds things up. Olive oil does not need this: part of the bitter compounds passes into the oil and gives it its typical, slightly bitter finish.