Earlier quoted context omitted.
History can also contain potentially sensitive things like hostnames of non-public systems, usernames, filenames, URLs. I would not want that stuff to hang around indefinitely.
You can tell your shell to ignore commands started with a space HISTCONTROL=ignorespace Or you can use HISTIGNORE to always ignore specific patterns.
HISTCONTROL=ignoreboth
to use both ignorespace and ignoredups