Tap water contains minerals and other substances that could potentially leave hard water stains in your glass. Distilled water is pure H2O, so there are no minerals left over to accumulate on the walls of your pipe.
The hard water stains can be removed with the proper cleaners and tools, but it is always easier to clean something that isn’t there in the first place.