It depends on the dentist but the specialist for root canals is the endodontist. Like medicine, dentistry is becoming more specialized with more dentists restricting their practices to fewer procedures. The upside here is you get really good at the things you do daily and the downside is patients may need to see someone else to complete some treatment.
Sometimes, it just comes down to how often something presents itself in a particular practice. For example, I'm a pediatric dentist which means because root canals on permanent teeth aren't required all that often in the pediatric population, 8 years went by between the last time I did a root canal and the next time a patient presented for one in my practice. Needless to say, I decided that day that I was so out of practice and that RCTs present so little in my practice, that it made more sense to refer to the people who do it daily. Another example, sometimes my teen patients need a crown on a permanent tooth but the last time I did a crown on a permanent tooth was literally 18 years ago because years and years can go by without a patient needing one - I don't even have the materials to do one or a relationship with a lab to fabricate the crown. A busy general dentist may be doing 3-4 crowns per day and so it makes more sense to refer these teens to a GD.
Sometimes, it just comes down to what a dentist likes or doesn't like doing. We all have things we were trained to do but for whatever reason don't like doing them. My dislike of root canals is partly because I haven't done one forever but also because from the first day in the endodontics clinic to the last root canal I completed, I just hate doing them and since there are people who like doing them, they can have them.