RNA is more versatile then DNA. RNA has a reactive group (2-hydroxy) while DNA does not. This allows it to not only form a structure and to pair (similar to DNA) but also participate in chemical reactions. RNA likely existed before DNA as a self replicating molecule.