This is a false dichotomy, just because a drug is used as an anti parasitic does not mean it has no reason to not work for other ailments.
Ivermectin binding pushes glutamate-gated chloride channels channels open, increasing the flow of chloride ions and hyper-polarizing the cell membranes. The fact that this action kills parasites does not cause it to not affect a virus's ability to replicate.