Because DNA collects mutations over time , which are then inherited , it contains historical information , and , by comparing DNA sequences , geneticists can infer the evolutionary history of organisms , their phylogeny .