It gets oxygen in our blood so we can function as without oxygen we would die.
To keep you alive. If you mean why a dog pants, it is to cool its body down because dogs do not have sweat glands like humans, to keep it from overheating (from heat, sun or exercise), which can kill both humans and animals.