When you just graduate from dental school, you've learned less than 30% of what it takes to be a dentist, and most of the time you don't even know what you don't know. (Side note, you don't even know if you really like doing root canals for the rest of your career!) Endo and other specialty training can only teach you a little more didactic and clinic skills, but even residency doesn't fully teach you about being a doctor. You're still missing that other 70%. And once you come out a specialist, other doctors and patients will expect you to be a fully functional, highly competent expert-- there's no room to flail around because you've never experienced real life work before. In 1-2 years of practice, you will learn so much about interprofessjonal communication, patient doctor communication, treatment planning, business management. Heck, even assessing restorability realistically.
So in sum, there's a reason you should get good at being a doctor before you try to become a specialist.