Sure, medical professionals are not necessarily any kind of super-rational savants, but I think it's unlikely that all of the medical professionals who are trying to hoard hydroxychloroquine are being irrational hysterics. They might be engaging in ethically questionable acts by hoarding hydroxychloroquine, but that doesn't mean that they don't know what they're doing from a self-preservation standpoint.
That said, it's not that I think they are necessarily trying to hoard hydroxychloroquine because they are convinced that it works - it's probably more that they want it on hand in case it turns out that it works. However, some of them may also have directly seen it help people, or may have heard or read about it helping.
Given that hydroxychloroquine has already been used for, as I understand it, weeks in treating people ill with COVID-19, I am actually surprised that there is not more anecdotal evidence about its efficacy. But I probably have just not been reading in the right places.
*Edit: I probably shouldn't have said "numerous stories", since "numerous" implies more than the number that I actually have seen.