You had it in your question...
given the prefix is named very intelligently, and each site can be distinguished easily by its name as a part of the prefix
When sharing the same database, every site must use it's own prefix, so any tables with that prefix will be associated with that one site, and no others. If you're moving a site somewhere else you would copy only the tables that begin with that prefix.