The plot is because his girlfriend likes pineapples. Everyone has a way of dealing with a failed relationship. His way is to buy cans of his girlfriend’s favorite canned pineapples to escape the breakup. This is also assumed. Giving this relationship a shelf life of another 30 days, he still held onto hope and luck. What he hopes to be cared about is himself, who is as humble and lonely as a can; what he hopes to be protected is his scarred heart. But as they say in the movie, nothing lasts forever. In the end, he didn't wait. The director probably wanted to use this to express the unsettled loneliness and emotional helplessness of urbanites.
This movie originally tells two stories, but they express similar themes, or there is no specific theme at all. Don’t get too entangled, just feel it, Wong Kar-wai’s movies are all disordered , symbolic. Those distinctive symbols are like the chaotic and disorderly inner monologue of urbanites.