Why do people say cheese when they are taking a photo?

Because they were using the computer and thought about it.