The Hosmer–Lemeshow_test is actually applying the Pearson's chi-squared test on deciles of confidence for both binary outcomes.
As such, it is can indeed be used in any binary classifier that provides confidence.
As for why it is more common for logistic regression, I can speculate.
It seems that the test was introduced at Applied logistic regression. D. W. Hosmer and S. Lemeshow, Wiley, New York, 1989. As the book name implies, the focus is logistic regression so that is why it is used in this classifier context.
As for why it is not common when other classifier are being used, I believe it is since other measures suites more the researchers need in unsupervised learning.
The chi-square test estimates fit and it is symmetric with respect to the deviation. In supervised learning we are usually interested in many aspects of the performance. One might want to maximize precision while other would like to maximize recall.