The immune system is a "complicated" thing to work with.
My favorite dad quip was 'Biology itself is proof against an intelligent designer.'
Evolution isn't going to nicely separate functionality into clean, single-purpose biochemical pathways.
It's going to overload something that it already has to support a new feature, leading to a rat's nest of intertwined effects.
The hard part in drug development isn't affecting your target: that's pretty easy to guarantee with modern tools. It's finding out that that target also governs 10 other, completely unrelated bodily functions.
Some companies in the valley just call that Wednesday.=)
Did you mean integration testing?
Evolution unit tests, then integrates in prod.
That's a great analogy, except it doesn't go quite far enough. The code for the toolchain that compiles the codebase (not to mention the unit testing framework) is just as old, and written the same way.
Your body basically is trying to do a sort of brute force/random combination of immune cells on the retrieved virus spike proteins until it comes up with the right combination.
https://en.wikipedia.org/wiki/Somatic_hypermutation
This process can result in B cells that produce antibodies which stick to virus proteins but also stick to your own cells. The B cells are essentially permanent, that’s how you develop lasting immunity, that unfortunately also means you have lasting immunity on one of your own cell types — autoimmunity https://en.wikipedia.org/wiki/Autoimmune_disease