7 human years = 1 dog year is just a rule of thumb, and it's not very accurate. Cats and dogs mature more quickly in their early years than humans do.
Basically, dogs and cats go through certain stages of development at different rates to humans.
"When we refer to "Dog Years" and "Cat Years" we are really looking at the ageing processes going on in the body and trying to equate these changes to those which occur in the human body at a given time of life."
They don't just take the average life of a dog and the average life of a human and come out with a ratio. It's based on the dog's development in relation to human development.
It's all observational, but those estimates are widely accepted and used.