What is $Z$ useful for in a CFT? As an example, the partition function of a free boson on a torus with modular parameter $\tau$ is,
$$Z(\tau,\bar{\tau}) = \frac{1}{|\eta(\tau)|^2}.$$
In quantum field theory, the partition function allows us to compute correlators and in statistical physics one can also compute quantities of interest, such as entropy. 
Now, in CFT, what is the partition function useful for, practically/physically speaking? Many books make a big deal of the derivation and then not use it for anything. 
 A: In two-dimensional CFT, the torus partition function is useful because it sometimes encodes the space of states, and because modular invariance of the partition function constrains that space of states. The partition function encodes the space of states provided the CFT is rational (i.e. we have finitely many representations of the symmetry algebra), and the symmetry algebra is simple enough. (For example, the Virasoro algebra, as opposed to larger W-algebras.)
However, the torus partition function does not tell you everything about the CFT. Actually, there can be different CFTs that share the same partition function. For example, Liouville theory and the free boson (a.k.a. the linear dilaton theory) both have the central charge as a continuous parameter, but their torus partition functions do not even depend on that parameter. Furthermore, the partition function only depends on one complex variable $\tau$, how could it encode correlation functions that depend on many variables such as the fields' positions and quantum numbers? 
For applications, the most interesting quantities are typically $N$-point correlation functions on the sphere, not the torus partition function. There is no way to deduce the former from the latter. The partition function is often given too much prominence, including in well-known books, and you are right to wonder why.
