I have no idea why people would think it would be effective against viruses.
I will not rule out that some came to this conclusion through earnest research but I would bet most of the people self-prescribing it, heard the idea from someone with a platform whom they trusted and went for it. A lot of people are in desperate situations and willing to take a risk they wouldn't otherwise.
This connects into your point about Trump in that he has a responsibility to pursue every avenue of research into combating covid. I would argue he also has a responsibility not to list out unproven treatments for fear that someone might take it upon themselves to try it out. I listened to several of his press conferences live and was able to tell from the context that he was just spit-balling, trying to give people hope that there were options out there being looked at.
Unfortunately no amount of context is going to stop mentally compromised (for whatever reason) people from misinterpreting a suggestion as an endorsement. Especially when it comes to such an emotionally-driven topic such as a global pandemic, we need to exercise caution in our messaging.