I agree; I'd forgotten that it was fresh pineapple (rather than canned).
In that case, I think it's possible that JonBenet did something she knew her mother would regard as naughty: she took one of those sealable containers of fresh pineapple up to her bedroom up to a few days before she died.
The night she was killed, I theorise she was put to bed and then woke up after everyone else had gone to sleep. She was all excited because she thought she was going to get a special visit from Santa, so she takes the pineapple downstairs with her, put it in a bowl, eats a few pieces herself. Lots of families make a big deal out of putting a snack out for Santa--it's a common and traditional thing to do.
"Santa" comes in and finds her, wipes the bowl and spoon clean.
During the chaotic morning that followed, both Patsy and Burke handled the bowl and/or spoon (depending on where their prints were found) but don't recall doing so. There were people coming in and out, they were trying to do a dozen things at once and they were what the military calls "task saturated." Meaning there was so much going on that they were no longer remembering events accurately.
If the intruder brought the pineapple (which I don't regard as highly likely) the only motive I can think of would be to use it to drug JonBenet, knowing that she liked it.
Who would know JonBenet liked pineapple? Well, her family, obviously. But there were people outside the family who could know or find out--she was a cute little girl, I can easily imagine her telling someone hired to do yardwork that she liked pineapple or someone helping with the remodelling or, really, anyone she came into contact with.
Kids are usually either very quiet or very outgoing with strangers, not many in the middle. I think going to pageants taught JonBenet to be unusually outgoing and "sparkly" with strange adults and perhaps overly trusting.