Scholarships and the PhD thesis in the Scandinavian system?
From what I have seen (a whole bunch of PhD students, though I have done my PhD elsewhere) is that the research PhD students do is going to be the content of the thesis. The thesis contains two parts, the manuscripts/articles published, and a coherent story based on the work.

So the thesis is a product of the research the students are doing during their PhD.

Now, this might be different for some fields, or funding situations, and quite likely, for industrial PhD positions.