It's not just a human thing; people who study wolves find they maintain surprisingly strict borders between different packs, and this behavior continues though a lot of other mammals and even some smaller animals like certain birds and insects.