Why do squirrels spend so much time in trees?

Why do squirrels spend so much time in trees?