It's not about genetic mutation though - there will always be self-reactive cells present in the body of someone without any dodgy mutations spontaneous or not. The way the system works (normally) is to create an antigen receptor for every possible theoretical antigen by combining different parts of proteins together initially. This includes cells specific to antigens in your body.
Then the system goes ahead and 'tests' the cells against the antigens naturally present in your body inside a specific organ (bone marrow or thymus) before letting them into the periphery - it can weed out the cells that happen to have expressed an antigen receptor that recognises something expressed by self cells. 98% of the T cells created initially will die (in a normal functioning immune system) - either because they don't recognise any antigen (they were created against something that can't be presented) or because they happened to recognise a self antigen. Because everyone (bar identical twins) has a different genetic makeup they all express self proteins with different shapes and this means that what constitutes 'self' and what needs to be 'disallowed' during development differs for everyone - this is why the specificities of the final peripheral pool of immune cells isn't entirely genetically encoded in the outset and you're allowed to begin with more cells than what you end up with circulating through lymph nodes and the blood. In fact, it would be impossible for you to genetically encode individual antigen receptors against all theoretical antigens in the human genome because there isn't enough DNA. The lymphocytes use a special process during development to manipulate the actual genome in those cells (cut and snip the DNA) and give different combinations of protein segments to create fresh antigen receptors - the process is completely random and that's what leads to the development of self-recognising receptors on some of the cells initially. But fortunately these cells will be killed later on.
(NB: Not all of these cells are killed and this is true for everyone, you and me both - this is how you can end up with an autoimmune disease, when one of these abhorrent cells becomes activated because the process of self-tolerance failed).
Basically, the answer to the original question is:
The B and T cells carry receptors to antigens present in the body because the specificity of these cells isn't encoded in the germ-line. You make everything first, and then you reduce it to what you actually need later on in the process of lymphocyte development.
Lymphocyte development is very complex and you're not required to know about most any of it. Just know that there are physiological processes, such as cell-death or peripheral inactivation, that serve to prevent the self-reactive cells present in every single normal person from entering the periphery and being able to cause autoimmune disease.