It's the Law:
This law is in place to protect you, your dog, other people and their dogs.
Just because your dog is friendly does not mean that other dogs are friendly. If the aggressive dog is on a leash and bites your off-leash dog, you will not be able to collect any money for your dog's vet bills and you will likely be fined for having your dog off leash, even if your dog does not survive the attack.
Many people of all ages are afraid of dogs. Not only is it rude to allow your dog to frighten people, it could cost you. If your dog causes a fearful person to get hurt in an attempt to get away from your dog, you could be held liable for the medical bills. People have a right to protect themselves from a perceived threat, so even if your dog is friendly, if they see it as aggressive they can hurt or kill your dog in self-defense and you have no legal recourse.
Dogs are Protective:
Your dog will defend you if he thinks you are being threatened or if he is being threatened. Without a leash, you have no control over the situations your dog could get into. If someone threatens your dog to a point that it feels it needs to defend itself, your dog could bite. This could cause you to be liable for the injuries caused by that bite.
It's the Responsible Thing to do:
The people you see on the news with dogs that caused horrific situations never expected that they would be in that situation. No one expects to be the owner of a dog that causes a death or that gets killed or that bites someone. However, you can greatly reduce your chances of that happening if you act responsibly and as an ambassador for good dogs everywhere. Keep your dog safe by keeping a leash on.