Because it is a standard deviation, tracking error measures the volatility of the deviation, not the deviation itself. Two funds can have the same average shortfall against their benchmark and very different tracking errors: one that trails its benchmark by a small, steady amount every single period has a low tracking error despite consistently underperforming, while one that sometimes beats its benchmark by a wide margin and sometimes lags by a wide margin, even if the two roughly offset over time, has a high tracking error despite ending up close to even. This is why tracking error is a measure of consistency and predictability relative to the benchmark, not a measure of whether the fund did better or worse.
The result is distinct from, and often confused with, tracking difference. Tracking difference is simply the total return gap between a fund and its benchmark over a stated period, a single number with no volatility component. A fund can have a small tracking difference over a year and still show meaningful tracking error within that year if the gap moved around a lot month to month before roughly canceling out, and the reverse is also possible. The two figures answer related but different questions, and a fund's marketing material tends to emphasize whichever one looks better.
For a fund built to replicate an index, several everyday sources produce tracking error even when nothing has gone wrong. The fund's own operating expenses are a constant drag the benchmark index itself does not carry, since an index is a hypothetical calculation with no costs of its own. Funds that hold a representative sample of an index's constituents rather than every single one, a common practice for very large or illiquid indexes, will diverge somewhat from the index's exact composition. Funds hold a small amount of cash to meet shareholder redemptions without needing to sell securities immediately, and that uninvested cash behaves differently from the fully invested index. And when an index periodically changes its constituents, a fund executing the corresponding trades faces timing and transaction costs the index calculation itself never experiences. None of these sources implies the fund is poorly managed; they are the ordinary cost of running a real portfolio against a costless theoretical benchmark.
Securities lending and dividend timing add smaller, more technical sources of divergence. A fund may lend out securities it holds for a fee, which can add a small positive contribution against the benchmark, while differences in exactly when dividends are received and reinvested compared with how the index calculation treats them can add or subtract a small amount either way. None of these typically dominates the total, but they are part of why even a well-run index fund rarely shows a tracking error of precisely zero.
Tracking error is a meaningful concept only for a fund trying to match a benchmark in the first place. An index fund or an ETF built to replicate a specific index is the natural subject of the measure, since the whole point of the fund is close, consistent tracking. A fund pursuing an active strategy that is not attempting to replicate any particular index is not usefully judged by tracking error at all, since deviating from a benchmark is the explicit goal of active management rather than a flaw to be minimized.