How duplicates are detected
Each line is compared against every line seen so far, keeping only the first occurrence and dropping any repeats further down - the original order of your list is preserved. By default, a line is only considered a duplicate if it matches exactly, so turn on "case-insensitive match" if "Example.com" and "example.com" should count as the same entry, and "ignore leading/trailing spaces" to stop invisible whitespace from making two otherwise-identical lines look different.
Why you can choose which copy to keep
Keeping the first occurrence is right when the earliest entry is the authoritative one - the first time a keyword, URL, or ID appeared. Keeping the last occurrence is right for the opposite case - a log or export where later rows represent updated or corrected values for the same key, and you want the most recent version to survive. "Keep last occurrence" outputs each surviving line at the position of its final appearance, so rows naturally end up in the order their last update occurred.
Why order preservation matters for most use cases
Keeping the first occurrence of each line and preserving the original overall order (rather than, say, sorting alphabetically afterward) matters when the original sequence carries meaning - a chronological log, a prioritized list, or data where row order corresponds to something else, like a parallel list in another file. Deduplicating without disturbing that order keeps the list usable for its original purpose.
Why case-insensitive matching is optional, not default
Case-sensitive matching is the default because sometimes case genuinely matters to the data - distinguishing "CODE" from "code" might be intentional in a dataset. Making case-insensitive matching an explicit opt-in rather than automatic avoids silently merging entries that were deliberately kept distinct by capitalization.
Why invisible whitespace causes "duplicate" lines to look unique
A line with a trailing space is technically different from the same line without one, even though they look identical when displayed - this invisible difference is a common, easy-to-miss reason a dataset appears to have no duplicates by a strict exact-match check despite visually repeated entries, which is exactly what the trim option is designed to catch.