Where did Ted get the mysterious pineapple in How I Met Your Mother? The puzzling pineapple appeared in the sitcom's first season and became one of the show's biggest fan mysteries. But the truth wasn't revealed until after the series ended.
"The Pineapple Incident" was episode 10 of the How I Met Your Mother season 1. Ted Mosby (Josh Radnor) and his friends tried to put together the events that took place before he woke up with a girl in his bed and a pineapple on his nightstand. Ted's night of drinking meant he had no memory of the night but the girl, Trudy (Danica McKellar), eventually filled in a few blanks. Despite some useful clues, however, she didn't have an answer explaining how the pineapple got there. Per the episode's future Ted narration, the gang never found out the truth.
However, that doesn't mean there isn't an answer, it's just not part of the show proper; the mystery was eventually solved in a deleted scene from How I Met Your Mother's final season, released as part of the complete series DVD boxset. In season 9, episode 20, "Daisy", Ted, Marshall (Jason Segel), and Barney (Neil Patrick Harris) team up to find Lily (Alyson Hannigan) after she disappeared from the Farhampton Inn. They end up at the Captain's (Kyle MacLachlan) house. In the deleted scene, the Captain mentioned to Ted how he previously stole from him, a playful joke intended to remark on how Ted stole the Captain's wife, Zoey (Jennifer Morrison). But it turns out Ted also stole something else from the man - a pineapple.
While Ted was leaving the Captain's house, he noticed a pineapple sitting outside of the doorway. The Captain explained that it's an old sea captain tradition and mentioned that he also kept one on his porch at his house in the city. With this prompt, Ted instantly had a flashback to his drunken night in 2005 before he met Trudy; while walking around the city in a drunken stupor, Ted passed by the Captain's city house and stole the pineapple from the porch. And with that flashback, the Pineapple Incident mystery was finally solved.
It may at first seem surprising that the showrunners didn't include the scene in the final cut considering how vocal fans were about getting answers to the pineapple mystery, but having Ted discover its origin when his 2030 self had claimed he never learned the truth would have created a pretty substantial plot hole. That said, Alyson Hannigan once took to social media to explain that the scene was cut due to time constraints.
Considering the controversy surrounding How I Met Your Mother's ending, though, it would have been nice to see the series go back to its roots and focus on their long-running jokes. At least fans eventually got answers.