An RNA primer is needed in DNA replication for a number of reasons. First, it is needed to provide information about the location of the DNA strand that should be replicated. Second, it is needed to help ensure that the new DNA strand will be copied exactly as it was copied before. This is important because if there are mistakes in the new strand, they will be passed on to all future generations. Third, an RNA primer provides an accurate template for copying the new DNA strand; otherwise, there could be errors in the new strand due to faulty copying of the original template.
RNA primers can also help other macromolecules such as proteins and DNA polymerase bind to their specific locations on DNA strands during replication.