While the case for Ivermectin has been weakened recently, there still seems a significant body of evidence to suggest that it does work.
Many (not discredited) trials show efficacy and there is a significant observational correlation between population mass consumption of Ivermectin and better results with Covid. There are also many doctors that swear by it's efficacy from their experience.
Trials aren't perfect. The drug companies have been manipulating trial data for decades to prove efficacy when there wasn't, it probably can be done the other way as well. And the incentive is there with such a politicized drug.