I spent a semester in Ph.D. school in Denmark, and I noticed what you describe: 4 years guaranteed funding with a boot at the end.
What this means is that at the end of four years, a student has to staple all the papers they wrote, back-solve for a unifying "thesis" and then defend. No matter what.
In general, this is why Europeans Ph.D.s tend to need a postdoc, whereas American Ph.D.s can (usually) transition directly to faculty jobs.
The US Ph.D. student is encouraged to hang on and continue publishing with their advisor while they're on a hot streak and for as long as the grant funding lasts.
This allows US profs to turn the last couple years of their Ph.D. students into postdocs paid at grad student wages.