You just described ecology. It is the branch of biology that deals with the relationship of a something/ someone and the physical surroundings. It is important because if it were not for ecology we would probably not be comfortable in certain enviroments and we would not be able to live wherever.