Hi and welcome to the forum. I'm pretty sure that the bear was a lot more interested in the food in the cooler than he/she was in you. You didn't say where the food cooler was stored. If it was in the teepe with you, I can understand why the bear was trying to get inside. Normally hikers in bear country will store their food in bear proof containers at least fifty to one hundred feet from where they sleep. Bears have very good noses and can smell very faint food odors. If they are hungry (almost always) they can take extreme measures to get at food. A woman I know had the window frame ripped off of her car by a bear trying to get at a recently emptied PayDay candy bar wrapper. Practice good food security and you are not likely to have such bear encounters.
_________________________
May I walk in beauty.