Oh we never make any antibodies from scratch in the lab, they're raised in lab animal serum by spiking them with the protein you want antibodies against, and purifying them out. In a vertebrate you have all the parallelism of evolution involved in helping make them, which you can't get so easily in vitro. Cartoon version of how it works in your body: you develop B cells. They randomly rearrange their genome where it codes for what antibodies they will make. Cells that react too often kill themselves, as they are (probably) reacting to your own antigens. If this fails you get autoimmune disease. Cells that do not react too often go to your lymph nodes. You are exposed to an antigen. It doesn't kill you before your B cells can react, and the ones that bind antigen from the pathogen reproduce and spread throughout your body. (Or if the antigen was peanuts or tree pollen, you're allergic to it now... constant low dose exposure can eventually make them kill themselves instead). The next time you're exposed to the antigen, the reaction will be faster and stronger since the B cells have proliferated. If this was a pathogen, it means you may not even feel sick or will have a shorter duration of illness. If it was peanuts or bee venom you may die. So... the immune system is very powerful but it is also dumb luck.