If I choose to take drugs without the intention of becoming addicted, and I become addicted, then yes, I became addicted by accident. Even if I was aware of the risks of becoming addicted.
Much like how if I decide to drive my car without the intention of hitting anyone, then if I hit someone, it is deemed an accident. Even if I was aware of the risks of hitting someone with my car.