Because they have to give that energy away in order to keep the grid stable.
Hopefully better battery storage will make this better in the future.
The aim with it is to naturally discourage people from overproducing in such overproduction times - e.g. maybe you disable your solar panels when you predict it will happen, lessening the sudden impact on the grid.
FWIW you could buy a high capacity home battery already to eliminate it yourself (charge the battery in those times), but they’re still expensive.