The $addToSet accumulator in MongoDB aggregation groups documents by a key and collects unique values into an array for each group. It processes each document, checks if the value is already in the array, and adds it only if it is not present. This ensures the resulting array contains unique elements. For example, grouping sales by item and collecting unique store names uses $addToSet to avoid duplicates. The execution table shows step-by-step how values are added or skipped. Beginners often wonder why duplicates are skipped or how the array starts empty; these are clarified by tracing the array state changes. This accumulator is essential for building distinct lists within aggregation pipelines.