If you don't lead for your dog, your dog will lead for themselves. This text comes from my personal opinion on what I have seen and experienced, training around 1,000 dogs. Unfortunately, most dog-to-dog aggression cases or human-to-dog aggression cases come from owners who aren't advocating for their dogs. As a result, their dogs are left high and dry, forced to make decisions for themselves, handle their stressors independently, and solve their problems without guidance.
Most dog-to-dog aggression cases originate from other dogs who have pestered, annoyed, and even bullied them. The dog will often offer calming and shut-off signals to the annoyance, but to no avail. After that, the dog will start to growl and snap. Once the dog learns that growling, snarling, barking, or biting are ways the other dogs listen to their requests, they will begin to access those behaviors more frequently because that behavior works for them. These circumstances are the same for dogs reactive on a leash, pulling and barking at all sorts of stimuli. These dogs are behaving the way they are because there isn't a leader present. They have no advocate, so the dogs learn to take matters into their own hands and do what they know gets them what they want, whatever that may be.
For the dog to human aggression cases, These dogs have been pet repeatedly when they didn't want it. Their owners often expect all dogs to love to be pet and played with, or they are anthropomorphizing and misinterpreting their dog's body language. These dogs have had many uncomfortable interactions with people and guests, forcing themselves on the dog or behaving in a manner that overwhelms the dog. The dogs will often show signs of anxiety and being overwhelmed whenever they first greet people. Sadly, people usually think this behavior means the dog is excited to see them and that no harm comes from further exacerbating the dog's energy. People get a kick out of watching their dog's pupils dilate and thrash about wildly squealing and whining as the people further pet and praise the dog. Soon after enough unwanted petting, touching, and overwhelming interactions have occurred, the dog will begin to take matters into its own paws. They will graduate to growling, barking, or fleeing the scene. If those behaviors work for the dog, then boom... you now have a dog who is on the path to learned aggression. The thing is, not every dog is bulletproof. No matter what the breed or personality is, you can push your dog too far until they snap.
To prevent this, be aware of your dog's body language. Observe when your dog is relaxed and calm. Observe when they become tense and agitated. Remember, dogs are not babies.. nor are they humans. They are predators; they eat poop, sniff butts, eat old carcasses, roll in the poop, lick their butts. Do they lick your face? Do you treat them like you treated your children? Are you trying to raise and discipline them like a human child? If so, change it, treat them like a dog, lead them into peace and comfort. If you see your dog is uncomfortable, agitated, stressed, step in and liberate your dog from their mental prison of anguish. Separate them from the stressors, have a firm hand to bring them out of their fearful or reactive states, then tell them what to do to maintain peace.