There are lots of ways that stock in food and energy companies could go down while prices go up. A drought or pipeline disruption come to mind.
The market needed a way to transfer this risk (risk of delivery) so prices went negative meaning you were paid to find a place for the oil.
It's really neat actually and shows how almost all of the financial system is really a big "risk transfer" mechanism.