It's usually not a case of the phone listening but, more creepily, that your behavior before and after talking to your wife about new shoes signaled that you want to buy new shoes.
Ad algorithms are surprisingly perceptive about signals that aren't obvious.