The probability distribution is for k=1,2,3,4,5,6.
But what is its generating function?
Can anyone explain why it is
It is this by definition of the probability generating function of the distribution.
Why this is a useful definition is another mater, and the answer to that is
its usefully properties (you should also note that it encapsulates all the
information in the pmf). Some of the properties that are of use can be found
here.
You should note that this is a z-transform of the pmf, which is the
discrete analogue of the Laplace transform, which of course with a bit
of jiggery-pokery gives the moment generating function for a continuous
distribution.
RonL