Why am I automatically plundering a friendly civilization's caravan?

The events are the other way around.

Greece declared war on you. Because their caravan was on top of your unit, it was automatically plundered.