Only Son is the dog that Heinz Doofenshmirtz's father won in a game of "Poke the Goozim with a Stick". As the dog grew, it became an award-winning show dog.
Prior to the lawn gnomes of Heinz Doofenshmirtz family being taken away, Heinz Doofenshmirtz's father won a spitzenhound in a game of "Poke the Goozim with a Stick". His father named the dog "Only Son" because the dog was like the son he never had, even though Heinz had already been born.
Only Son became an award-winning show dog that brought his father fame and fortune. This should have allowed the Doofenshmirtz family to prevent the lawn gnome from being repossessed or to buy it back, but it did not. Either the family became poor again or Heinz's father hid the money and prizes from their creditors. The look exchanged between Heinz's father and Only Son as they won yet another competition (see the third picture below), coupled with his constant admonishments that Heinz not move while Heinz was being the lawn gnome, seems to indicate that he deliberately placed Heinz in that situation. ("Got Game?")
This mis-treatment as a child resulted in Heinz Doofenshmirtz having a fragile self-esteem, and caused him to seek revenge as an adult. His first act of revenge for the mis-treatment was to steal all the lawn gnomes in the Tri-State Area. ("Lawn Gnome Beach Party of Terror")
The second was trying to win the Danville Dog Show by firing a Misbehavinator at the competition ("Got Game?").
The reason for naming the dog "Only Son" indicates that these events occurred before Roger became part of the family, since Roger is the more successful of the two brothers and was his mother's favorite. But it is still possible that Heinz's father didn't favor Roger like his wife.