They just do, the state cache stores all states in existence including those on hidden nodes. The garbage collection is part of the state cache management and the number of nodes that are in view has no impact on it.
You should not see any time in garbageCollectStates if you disable garbage-collect-states
in Config.prc or the state cache altogether.