The function of mitosis is for DNA to divide into two daughter cells during the cell division process.