Either can happen. The root cause is growth of Burkholderia gladioli [0] on certain foods rich in specific fatty acids, which include coconut and corn. This can happen during the fermentation process of fermented coconut and corn products if there's Burkholderia gladioli contamination and the pH, salinity and temperature aren't controlled to prevent its growth, but it is also possible for Burkholderia gladioli to contaminate food containing coconut or corn after it has been produced and produce bongkrek acid while it is being stored (e.g. [1], which is where I first learned about this).
Bongkrek acid [2] is odorless, tasteless and is not destroyed by cooking. Food can show no signs of spoilage and contain a lethal dose, though fermented products that were contaminated during production might show differences in color, texture and smell if the Burkholderi out-competed the normal fermentation process.
[0]: https://en.wikipedia.org/wiki/Burkholderia_gladioli
[1]: https://youtu.be/yXnSYfv6bCA?si=7DTW4J0ahMoWUuLd
[2]: https://en.wikipedia.org/wiki/Bongkrek_acid
[3]: https://en.wikipedia.org/wiki/Tempeh#Tempe_bongkr%C3%A8k