Partial classes provide a way to split the code of a class across files.
This way one file can contain generated code and another file could contain handwritten code. The generated code can than be regenerated without messing with the handwritten code. Had the custom code been added to the same file as the generated code, the regeneration would have overwritten it.
Visual Studio itself uses this in many places where designers generate code and users add logic. Sometimes Visual studio hides the generated code by only generating it during compilation (Compiling WPF applications generates a 'bridge' class between Xaml and 'code behind') and sometimes generated code is put in partial classes without providing an empty twin class which is left to the developer.
In general: when generating code use partial classes as a service to the developers that use the generator. And while we are at it: consider providing partial methods as well to allow the developer to hook in to the logic of the generated code so the developer is free to chose between implementing the partial method, sub classing the generated class for the correct reasons.