In most markets, it happens because one player is being given some subsidy - ie. 'we will guarantee all power you sell sells for $X/MWh', or 'You get a contractual green bonus of $$$ if you produce XMWh this year'.
Those contracts mean the person producing the power is still incentivised to do it even with negative prices.