Candidate quality is a factor. Less so than in the past but still a factor. Not sure why everyone on this site thinks it makes NO difference whatsoever.
Well, for one thing, that post was a joke.
I don't believe anyone ever claimed it makes no difference whatsoever, particularly in extreme cases like Roy Moore. Just that fundamentals, partisanship, political environment, etc. are the main drivers of the vast majority of election outcomes, especially in the present day. Even in one of the most extreme examples, 91% of Republicans still voted for a literal pedophile (see sig.)