I mean it's a bit more complicated, since ribosomes are themselves mostly made of RNA. Which gives RNA a kind of unique property that it can not only be transcribed into new proteins but also build the machinery to do this transcription.
Given a bath of amino acids you can easily use RNA to bootstrap a whole self-replicating system, which is probably what happened by accident at some point.