Why do database examples sometimes finish with an add_option call?

It’s adding a record in the database of which version of the database is in use. This can be used in future to determine whether or not the database structure on a given site needs to be updated if the plugin changes its database structure in a future version.

You’ve likely seen this yourself when updating WordPress and it tells you you need to upgrade the database. Whenever this happens WordPress records which version of the database is in use so that when WordPress is updated it can see whether an upgrade is required.