“Why did the dog go to court?”/“Because he got a barking ticket.”

People get parking tickets, and dogs get…barking tickets? A riddle has been cited in print since at least 1975:
 
Q: Why did the dog go to court?
A: Because he got a barking ticket.

 
     
6 July 1975, Washington (DC) Star, “Mini Jokes,” Mini Page, pg. 3, col. 1:
Q. Why did the dog go to court?
A. Because he got a barking ticket.
James Bruce
   
Google Books
The Official Cat Lovers Dog Lovers Joke Book
By Larry Wilde
New York, NY: Pinnacle Books
1978
Pg. 95:
Why did the dog go to court?
Because he got a barking ticket.
 
4 June 1978, Newsday (Long Island, NY), “Smiles,” Kidsday, pg. 1, col. 3:
Why did the dog go to court?
Because he got a barking ticket.
Donna DiBitonto, Franklin Square
   
Google Books
The Kids’ Dog Book
From the editors of OWL magazine.
Toronto, ON: Greey de Pencier Book
1984
Pg. 81:
Q. Why did the dog go to court?
A. Because it got a barking ticket.
     
Google Books
The Best Joke Book for Kids #3:
With Elephantics and new knock-knocks

By Joan Eckstein and Joyce Gleit
Illustrations by Joe Kohl
New York, NY: Avon Books
1990
Pg. 44:
BO: Why did the dog have to pay a fine?
BUB: Why?
BO: Because he got a barking ticket
 
Twitter
Andrew Buchanan
@KardboardRobot
Replying to @grantbenson
@grantbenson Why did the dog go to court?  He got a barking ticket!  😉  Oh yeah.
5:45 PM - 1 Mar 2009
 
Twitter
Fred Hassen
@FredHassen
Q: Why did the dog go to court?A: Because it got a ‘barking’ ticket!
2:16 PM - 4 Nov 2009
 
Twitter
Popsicle Jokes
@Popsicle__Jokes
Why did the dog go to court?
He had a barking ticket #PopsicleJokes
11:35 AM - 14 Nov 2012
 
Google Books
The Super, Epic, Mega Joke Book for Kids
By Whee Winn
Grand Rapids, MI: Zonderkidz
2016
Pg. ?:
Why did the dog go to court?
Because he got a barking ticket.
   
Reddit—3amjokes
Why was the dog in court? self.3amjokes
Submitted September 17, 2017 by DarnedBagboyJr
He had a barking ticket