In baseball, a walk is when a pitcher throws four pitches out of the strike zone, and the hitter swings at none of them, they can acquire first base. A dog is an animal that needs to get walked, as in go outside and walk on the sidewalk, for their well-being. The joke is playing on the word "walk" and its different meanings. 
A dog who played baseball always got walked .