What's the role of bromelain in pineapple?
Antifungal properties? as tested in below article.

López‐García, B., Hernández, M. and Segundo, B.S., 2012. Bromelain, a cysteine protease from pineapple (Ananas comosus) stem, is an inhibitor of fungal plant pathogens. Letters in applied microbiology, 55(1), pp.62-67. Available here