Dogs like squeaky toys because the squeaker reminds them of the sound of dying prey. Domesticated dogs are the descendants of wolves, who are skilled hunters and love the adrenaline associated with hunting.
Dogs play with squeaky toys the same way wolves hunt for food. When wolves hunt, their ears are tuned in to hear the cry of a startled or injured animal. When the wolf finds the animal, it begins the killing process, during which the prey cries out more loudly. Once the animal is dead, its crying stops, the wolf knows the hunt is over, and he feasts and leaves the scene.
A dog's squeaky toy represents the wolf's prey. Its squeaking sound mimics the sounds of startled or injured prey, which stimulates an adrenaline rush. The dog pounces and attacks the toy just as a wolf would attack its prey. Once the squeaker is out of the toy, a dog considers it dead and gets bored with it.
Not all dogs respond to squeaky toys in the same way. Some dogs like the sound of a squeaker while they play because it acts as a reward system. Just like when they get a treat for good behavior, the squeak is reinforcement for their play.