As you have seen, the main function of the immune system is to rid the body of things that are foreign and don't belong in the body. However, when we eat, we bring food, a foreign substance, into the body. In most people, food doesn't trigger a response by the immune system. Their bodies digest food and use it to keep their bodies functioning.