Italy has convinced the world that it is the king of liquid gold – hiding the fact that a significant proportion of "Made in Italy" olive oil comes from Spain.
Italy has a fraction of the territory of Spain, of which a fraction is usable in agriculture (Italy is mostly mountains), and a fraction of that can be used for Olive trees. Of course Spain has more yield, with their immense spaces and flat fields.
As for selling more or less, it's just a supply chain thing, Italian companies were better placed to sell it, but the bottle clearly states when it's Italian oil and when it's not.
These sort of antagonizing takes intra-EU are not helpful.
Italy is 60% of the size of Spain and has a similar ratio of arable land (27.1 vs 27.9% per Wikipedia, Spain is also quite mountainous). Doesn't really invalidate the point in your comment, but I expected a bigger difference when comparing "immense spaces and flat fields"to a mostly mountainous fraction of the territory
A big difference between Spain and at least Greece, is that in Spain, farmers tend to optimize for yield. This means they are planting and cutting down trees quite often, whereas in Greece old trees are usually left standing for longer.
One of the world's biggest olive producers is Tunisia, where you have actual desert. Anything that can capture a little of the humidity, like valleys in between hills, they plant olive trees. If it has a little more water it's dates.