My guess would be that when they computed the line items and the totals, they used rounded numbers more freely than they perhaps should have, but computed the net income using more accurate numbers. Perhaps you could check the Colonies tab and sum up the incomes listed there, or (if you really want to) go through all your planets and list the gross standard income, tourism income, and expenses for each world, sum those up, and see if the numbers you get match.
21 is too large to be a rounding error on standard rounding with only 9 line items, but if they're rounding the numbers before computing the line items and totals, it's doable. If the error is only in the colony income, tourism income, and colony maintenance, then you could have rounding error account for this with only ~14 colonies when rounding to the nearest integer (this shouldn't be likely; you'd need for your standard and tourism incomes to consistently round up to about 0.5 higher than they should be and your colony maintenance costs to consistently round down to about 0.5 less than they should be, giving you 14 more income and 7 less expenses than you should have, which if the net income is computed with less rounded numbers would show up as an error of 21 credits from the expected value based upon the totals). I would guess, however, that much of the error is in ship maintenance costs if the error comes from rounding before summing to generate line items and totals but not nets.