Why do the stal enemies die from the stazzlefruit??

Is it related to the fact that it’s light and they only spawn at night?? idek if they only spawn at night but that’s what it feels like.