While identifying what is self and what is other is the core, it is not technically the goal of your immune system. The goal above all things is maintaining and establishing homeostasis: the equilibrium between all the elements and cells in the body.