Manipulate Vertex group names in the bmesh API
Vertex group names are stored in the object, not the mesh.

The order of groups just has to be aligned between the mesh and the object.

So yes, you have to name the group on the object.