Because it was not related to Covid. If someone with heart problems is admitted with Covid they will receive their heart medications in the hospital, that doesn't mean that now heart medication is a Covid medication, so doesn't get mentioned in studies. The same goes for dewormer, it was in normal use against worms. Only after people started believing that it could be a treatment for Covid, that it started being studied for that (with different protocols). And then we found out that it is just a dewormer like we thought in the beginning.
Except in this case the dewormer is the central focus of the study. The relationship between worms in the population and its influence on covid outcomes makes that highly relevant to the publications. If it's known to be present in the general public, then not controlling for that in your study is just shoddy science.
More likely: a case of wishful thinking. Need miracle cure, found miracle cure, look no further.
Ivermectin being cheap and widely available is really important here. Something like that- instead of a novel vaccine made with novel tech in very specific first world factories- is very attractive to cash strapped governments and public health systems.