You should probably qualify your statement, because I don't know what country/context you're speaking from.
That might be the case in the UK but not the U.S. 4 years is closer to a minimum here than a maximum, and some fields (e.g., history) it may be ten years or more.
And now a lesson in international academic culture.
In European-style universities, you do a Masters of Science first, followed by a PhD. The MSc might take 2 years, then the PhD another 3. This leaves you with 5 years of postgraduate studies before you're "done" (or rather, before you have to "up or out" into a new position).
In American-style universities, you do a 5-year PhD (median is more like 6 years for certain fields where actual experiments take a long time). This will involve roughly two years of coursework equivalent to an MSc, followed by a "qualifying exam" called "quals". This exam could be either a research/engineering project or a series of actual paper exams.
Quals, or passing your MSc, is a very important time in the life of a graduate student. It marks the full transition from "student" to "worker". PhD students past quals are only nominally students, and in fact will only take courses at very advanced levels of knowledge and only to help them with research. MSc/pre-quals students still have a coursework requirement, but it's already getting more research-focused and less heavy than an undergraduate course-load.