Yes, sure. I agree.
Nevertheless, it is not mandatory to change (or, even worse, destroy) the existing project.
A single class (or a file containing more than one class) could be easily copied into a new project (containing all of the required support code) and compiled as a library. I can easily do that by hand so I cannot see any reason why it cannot be done by (a reasonable complex piece of) software.
After all, when you "export" something from a project or a document, usually the original project/document remains untouched.
I could also imagine a GIT-based approach, based on branching. In this second case, the developer would get the added benefit of maintaining a explicit parent/child relationship between the original project and the exported component (and being able to merge back if required).