Actually, while a yeast infection isn't really a STI, it *can* be transmitted and even men can have it. Look it up!
It's true, but it's also complicated. I will expand on this for the sake of completeness. Yeast infections are caused by the yeast
Candida albicans, which is a common pathogen that can be found in the mouth, gut, and genitals, even of
healthy persons. It is basically "everywhere" : soil, water, food, surfaces, etc. As an opportunistic pathogen, under the right conditions, it can start to multiply and cause symptoms: a yeast infection. Thus, if someone has a yeast infection, it is not necessarily because someone passed it on to them (although possible), but it's more likely that the person had it for a while, and that conditions became right for its multiplication (e.g. a weakened immune system). Still, if someone has
recurring yeast infections, it may well be that they are being chronically infected by their partner. In that case, treating the partner, in addition to the patient, might eliminate the source of yeast and solve the person's symptoms. For all these reasons, as you pointed out, it is not considered an STI. As an analogy, you can catch a cold while having sex, but we don't consider cold viruses an STI.