WordPress updates

Simply put it doesn’t know. WordPress core periodically submits all the plugin data to api.wordpress.org (see wp_update_plugins()) which responds with updates available.

Note that plugins are downloaded as archives, SVN doesn’t participate in the process directly and is only used as back-end storage mechanism.

So “knowing” that plugin doesn’t belong is essentially when API cannot find matching one. Which is often problematic with it making wrong matches and custom code is needed to exclude such plugins from update check.