While subsidies are one cause, another cause is demand response problems:
Imagine you have a greenhouse factory producing strawberries. The strawberries come out of the factory on a conveyor belt. Now, you can't just turn off this factory easily since it might take a week to get it up running again and you don't have any storage, so what happens when nobody wants your strawberries for a day?
You pay someone to take them.
And yes, it happens to physical products too, e.g. household electronics - you need to pay someone to scrap them.