I've always viewed `awk '!a[$0]++'` as superior to `sort | uniq` because it preserves order and does not have to sort the data first before deduplicating. But `sort | uniq` is much easier to remember.
Another difference is that sort is optimized to handle large files [0]
[0] https://unix.stackexchange.com/questions/279096/scalability-...