Given that he ran across the street to buy a mask before re-entering and he was rummaging around, it’s hard to claim that his intentions were innocent. But I wasn’t actually sure he’d committed a crime by walking into a public business through an unlocked front door, so I dug around a little.
Apparently, “breaking and entering” depends on intent rather than actually circumventing some safeguard to enter. So they don’t have to prove that the person actually committed a crime while inside the building, but they do have to prove that there was intent to do so. Which going across the street to buy a mask first probably does.