Psychology says people who rehearse what they will say before entering a shop may be anticipating social situations - The Times of India
You are standing outside a shop, waiting to go in. You already know what you want to buy, but before opening the door, you mentally practise what you are going to say.