During mitosis, a cell divides into two identical cells referred to as daughter cells. In order for both cells to be fully functional and to be able to mature, they each need a complete set of DNA. To prevent the mutations and errors in the DNA, the process has to be extremely accurate. Usually the error rate for copying DNA is around 1-3 errors for every billion base pairs. To get this extremely exact method of copying, there are many checks that happen within the process. The DNA helix unwinds and the strands separate to allow the enzymes used in replication to do their work. If the DNA strand is found to be broken or damaged, the entire process stops until it is repaired.
This process has to occur before mitosis because once mitosis starts, the cell is already preparing to divide. Soon after it begins, microtubules are forming in order to separate the newly replicated chromosomes. The DNA replication process not only has to be completed before this point, but the DNA has to be wound back up and the two copies of the same chromosome (now connected at a point in the chromosome) have to get in position so that they can be pulled apart, each destined for its new cell.