You'd like to know how to be better prepared, so I'll try to address that. This will be long, but I hope it helps.

First off, having more weapons would not make you better prepared. Even if you'd had bear spray with you, using it in the confines of a teepee is not a good idea. That stuff is powerfully irritating to your eyes, nose, throat, and skin and there'd be no way for you to avoid the cloud of spray inside a teepee. Guns, spears, knives all would be terrible ideas, too. Wounding a bear is **not recommended** and killing it quickly with any weapon is, shall we say, a long shot. As you found out, bears are indeed huge animals.

That air horn, however, was probably more than sufficient to your needs, which was to scare the bear away. What you needed besides the air horn was enough knowledge to know how to react and what to do. Coming here to gain some knowledge was an awesome idea.

Here's some knowledge about black bears, which is very likely the kind of bear you encountered. Bears spend almost every minute of every day either eating something or else thinking about food. Food is far and away the most important thing in their lives. Nothing else comes close. They aren't very picky eaters. They'll eat whatever is handiest, including insect larvae, earthworms, berries, roots, almost anything with calories. To help them find food they have incredibly sensitive noses and a sense of smell that is far better than a bloodhound's. (But they don't have very good eyesight.)

Lastly, bears are pretty intelligent and very curious, very similar to a smart dog. Unlike dogs, they are usually not very aggressive and prefer to avoid trouble. Being so intelligent means they have individual personalities, memories, and opinions.

How a particular bear views humans will depend a lot on its past experience with humans. Sometimes it depends on where the bear lives. For example, in some places in California, especially in Yosemite and the Sierra mountains bears have learned that humans won't harm them, so they aren't afraid to come right into your camp and rob your food. In the vast majority of places, black bears are afraid of humans. If the place is very wild and the bear rather young, they may not know anything about humans, but their instinct is to avoid trouble, so you can scare them off anyway.

So, now you understand a bit more about bears.

When a bear comes into your camp, 100% of the time it smelled something interesting -- either food, or something else that smelled good enough it was curious about it. It isn't looking for trouble, it's looking for food. So, the first thing to do is not put the food where you are! Put it in a place the bear can't get it. In fact, try not to have anything with you that might smell really good to a bear, like toothpaste or perfume.

Next, the bear that was sniffing around your teepee probably will run away if it has a choice between running away or fighting you, so you need to convince it you are mean, feisty and big. A really loud noise == something really dangerous, so the air horn ought to do the job.

Lastly, if the bear happens to be the extremely rare bear that can't be scared off with an air horn, then you need to be the one who leaves. The best way to leave is to back off, facing it, and talking loudly to it. The problem with running as fast as you can is that it makes you look like prey, which is the opposite of being mean, feisty and big.

It would help us to know where you live, because if the bear was a grizzly, then you have a different problem and different knowledge to gain. But it could be a grizzly only if you live in Montana, Idaho or Alaska.

If you have questions about all this, feel free to ask.