How does hyperglycemia lead to weight loss?

Can you answer pren79’s question about Diabetes?:

I’ve read in plenty of places that weight loss is a common symptom. Just wondering how that could be?

Diabetes Risk Factors