Bacterial vaginosis is not really an STI, but a disturbance of the bacterial equilibrium in the vagina.
Normally, vaginal acidity is in balance. Certain things can disturb this equilibrium, such as washing the vagina with soap, or wearing a tampon too long. When the equilibrium is disturbed, the environment becomes less acid, which offers certain bacteria a chance for excessive growth.
Sometimes complaints occur suddenly. You can also have bacterial vaginosis without noticing any signs of it. Treatment is only necessary if you have unpleasant symptoms. It responds well to treatment.