Why do living things live where they live?

Because that might be the place that suits them or their group/species best. For example: a kangaroo would not live in the ocean because that wouldn't be a good place for them (although it is the best place for other creatures like fish). Their main food sources are found on land and they are not the best swimmers. They would get tired and drown, causing the possible extinction of their species.

The fish live in water, and this suits them best because it is where they have the best chance of survival, providing them with their dietary needs and the right environment for their bodies. A fish would not live in the desert because they wouldn't have the right food, and their bodies would not be able to function without water and from all the heat. They wouldn't be able to breathe.

Some species evolve to fit their surroundings, some do this well and others don't cope with the change. A simple example is the pigeon. Obviously, there wasn't always huge and greatly populated cities all over earth so the pigeon didn't live in cities. Now pigeons can be found in many cities, are used to the sounds, people, and other animals and dangers and are associated with busy cities. They have coped well because they are not endangered or extinct.