Robert Herman Sr., 57, had pleaded guilty to endangering a child and animal cruelty, according to the Intelligencer Journal/Lancaster New Era.
Herman told the sentencing judge he kept the animals in the home on Main Street in Ephrata while he was making plans to buy a farm, an explanation that appeared to baffle the judge.
"It sounds like you put the cart before the horse," said Judge Joseph Madenspacher. "You bought the animals before you bought the farm."
Prosecutor Christine Wilson said the animals included parakeets, pigs, dogs, turtles, chickens, a dead rabbit and a chinchilla.
When charges were filed in May, police said some of the animals required veterinary care.
Wilson said after the hearing that feces covered most of the floors and was splattered on walls.
The home was condemned, and the boy now lives with his parents elsewhere. The parents, who also lived in the mobile home, still face charges. Police said in May that a fourth and fifth person were living in the home as well but were not charged.
Ephrata is located about 15 miles north of Lancaster in a farming area.
Information from: Intelligencer Journal/Lancaster New Era