Why, you ask?
Because a dog is not a machine. A dog is alive. A dog has desires.
Because dogs need a chance to run, faster than you or I or any Olympic sprinter ever could--not just for exercise, but to savor their own physicality, decide when to go left, when to go right, when to go straight ahead at full speed.
Not ALL of the time--you don't get to do what you want all of the time, and neither does anyone else. But sometimes. Maybe it's a delusion to call it 'freedom', maybe freedom itself is a delusion, but dogs don't have existentialist crises, and they'll take what freedom they can get, in whatever form they can get it, and gladly. And in the process, teach you a thing or two about what freedom really is, and what it's really worth. And how lucky you are not to entirely depend on someone else's kindness in order to enjoy it. And how wonderful it can feel to be the provider of that kindness to those who do require it, and most keenly appreciate it. As the writer of the passage below once did for a shut-in Alsatian bitch (it's the correct word, sorry)--who became the love of his life. For better and for worse.
J.R. Ackerley, "We Think The World of You"
That's not the only reason why. But it'll do for a start.