The reason for this pattern is that maintainer scripts in Debian packages tend to start with
set -e, which causes the shell to exit as soon as any command (strictly speaking, pipeline, list or compound command) exits with a non-zero status. This ensures that errors don't accumulate: as soon as something goes wrong, the script aborts.
In cases where a command in the script is allowed to fail, adding
|| true ensures that the resulting compound command always exits with status zero, so the script doesn't abort. For example, removing a directory shouldn't be a fatal error (preventing a package from being removed); so we'd use
rmdir ... || true
rmdir doesn't have an option to tell it to ignore errors.