Antigen matching is rarely 100% exact though, and it's possible that an antibody match could have partial binding to existing normal body proteins, especially if the virus is using those proteins itself. Hypothetically that would lead to an autoimmune response in addition to an immune response to the virus.
I suspect this means the helper T cells also play a role in preventing generation of auto-antibodies (at least for T cell-dependent (TD) antigens).
And once the B-Cell is activated and forms a germal center to specialize, I'm not sure what if any negative selection system is used to prevent accidentally targeting autoantigens in addition the foreign antigen. (If an autoantigen is similar to the foreign antigen, then this seems like it is rather possible.)
The whole process is crazy complicated. Like most of biology, it seems like a miracle that it even works at all, much less that is seems to generally work rather well in general, despite the problems that can occur.
From an evolution perspective, it may improve survival chances to form antibodies with partial autoimmune match and beat the infection, rather than form less antibodies period. Also because the infection is an immediate death threat, while autoimmune disorders (like Celiac's) can be a major inconvenience that doesn't stop reproduction.