After purchasing a phone from the store should a factory reset be done to erase anything that the store or someone might have put in?
If the phone is new and in the box, then it has probably never been turned on. You can tell because the first time you turn it on (after fully charging the battery), it will go through the initial setup process, inviting you to enter or create a Google account, and showing some pop-up tips about adding shortcuts to the home screen.
If it's second-hand, then the shop or the previous owner should have factory-reset it already, but you can tell in the same way. If you turn it on and get the initial setup process right away, then you're already starting from a fresh state. If you just get the home screen, with no setup screen inviting you to enter or create a Google account, then you need to factory-reset from the device settings.