please use your brain and answer this riddle

man lives on the 10th floor of a building.
Every day he takes the elevator down to the ground floor and goes to work.
When he comes home, he takes the elevator up to the 7th floor and walks the rest of the way.
But on rainy days, he takes the elevator all the way to the 10th floor.
Why does he do that?