i do not see how or why this would be considered illegal...
you could come up with just about any reason why it was an "emergency" for you to go out the door... such as your nicotine dropped to low, and you needed to get outside for your emergency cigarette, or something like, someone just texted you that there was a sale at one of their competitors stores, and you had to get there quickly, because much of the merchandise was gone already..
now if the door is not labeled "emergency" but "fire exit" or something similar... i guess you would have to come up with some other type of stupid excuse...