One convincing answer to this particular question is that chloroquine was said to be effective against the first SARS-CoV, the one that caused the first SARS outbreak. There's a paper published in 2005 that claims that chloroquine has an inhibitory effect against the SARS-CoV virus; and since the SARS-CoV-2 was thought to be closely related to SARS-CoV, it was natural to assume that a drug thought to be effective against one virus would also work against the other.
Of course I don't know how valid those early claims were that chloroquine works against SARS-CoV in the first place. There weren't enough cases to run proper clinical trials.
Now the mystery shifts 15 years back — how did it occur to someone to test chloroquine against SARS-CoV back in early 2000s.