People would light fires to establish ownership and keep others away.
There are of course innumerable survival reasons why fires are good (it's pitch black, probably cold, and there aren't a lot of other ways to cook food or clean water). Animals don't tend to be enamored of them either. But the most important factor will be warding away other people.
Put yourself in the position of someone moving around who might spot one of these campfires. You're moving around after dark, which implies you're in something of a precarious position as it is. Humans aren't very well adapted to the night, and we're usually better off staying put unless there's no other option. (Except in deserts, but even then you want to move around sunrise and sunset when there's some light.)
Now in the distance you see a fire. Assuming it's not some sort of wildfire, you know exactly one thing: somewhere in that vicinity, there's at least one human. You don't know if it's one or twenty. You don't know if they have someone keeping watch, or if they set alarms or traps. You don't know if they left for a couple minutes to take care of some chore, only to be walking up right behind you as you approach. You have no way of being sure. All you know is that this ground is taken... and there's plenty of other safe, dark places all around where you have no particularly elevated risk of running into people.
Most humans, especially in this sort of survival setting, are terribly risk-averse. (Actually, we're risk-averse all the time - even though in modern life it's usually bad for us - specifically because it's a survival trait in the wilderness.) They will opt not to start a confrontation that they have every reason to believe will end badly for them.
On the other hand, if the camp had no fire, then you wouldn't see it until you were right on top of it. At that short range, neither you nor the other(s) have any time to think or react, and your instinctive reaction could lead to them being shot, or you being shot, or both.
With that said, rather than light up in the middle of the street like that dapper gentleman, I'd look for a building with a couple of walls still standing at the very least. It's safer and it keeps the wind off.
Note that this is assuming most of the people you're coming across are individuals or in small groups. If you're in a large group and they're in a large group, you probably have much better ways to avoid trouble. If they're in a large group and you're not, well... good luck?