This is actually pretty straightforward. The chi-squared distribution is a distribution of continuous values. A chi-squared test statistic may or may not be able to take any positive real value. For example, the test statistic for a likelihood ratio test can take continuous values, but the test statistic from a chi-squared test of independence for a 2x2 contingency table can only take a finite set of discrete values. The former may match the theoretical distribution just fine, but the latter will be an approximation. If your sample is large enough, the approximation isn't a problem and the Yates' correction for continuity also helps a lot, so in practice it isn't usually something that you need to worry about often. To understand this further, it may help to read my answer here: Comparing and contrasting, p-values, significance levels and type I error.