Doctoral degrees in developmental, experimental, social, etc. are strictly academic/research degrees that do not prepare you for clinical practice. They do not include clinical practica, and there is no requirement to complete an internship year. Hence, they tend to be completed in fewer years.
School psychology, counseling psychology, and clinical psychology programs can lead to licensure if they are accredited by the APA (some states will also accept a doctoral degree from an unaccredited program that is "equivalent," but this mechanism is falling out of favor). States require completion of the Ph.D., including a year-long full-time internship, and some states require additional postdoctoral experience prior to licensure.
It is also possible for a school to offer a doctoral degree in clinical psychology without meeting requirements for APA accreditation. Many online programs do just that, and conveniently gloss over the fact that they do not satisfy licensure requirements.