Believe it or not, the causative agent is the Ascorbic acid from the pineapples, which is known to cause pit corrosion (explained [here](https://www.substech.com/dokuwiki/doku.php?id=pitting_corrosion)) with stainless steel! Here is a [source](https://link.springer.com/article/10.1007/s12540-016-5684-7) "Effect of ascorbic acid on the pitting resistance of 316L stainless steel in synthetic tap water", to quote:

"Above the 10^-4 M of A.A concentration, A.A generates soluble chelate rather than absorbs on the steel surface and it causes passive film deterioration and severe pitting corrosion."

I actually did a related [thread](https://www.sciencemadness.org/whisper/viewthread.php?tid=152955#pid620207) on it in another forum. Others reported similar experiences, my experience started with mango juice exposure to stainless steel steak knives left unwashed in a sink. 

Apparently, in the presence of moisture, oxygen, iron, Ascorbic acid  (a source of H+ and a chelate) and tap water minerals (electrolyte), an electrochemical based pit corrosion reaction can proceed with time.