Why does DNA stick to glass?
Why shouldn’t it? Why does anything stick to anything?
Is there something more behind your Q?
Welcome to the SDMB.
Glass I believe carries a positive charge. DNA then sticks to the positive charge (it is negatively charged based on salt concentration due to the phosphate backbone).
One can also give a burst of UV light to covalently attach the DNA. What happens is that thymine absorbs UV at about 260 nm. This makes a free radical, and this can form a bond between the DNA and the glass.
More commonly, glass is coated with another molecule (like IIRC silane or lysine derivatives) to give the correct ionic charge so the phosphate backbone sticks.