In my model you can see, that legs are blue in the weight paint mode. But when I rotate the bone, legs move too. Why is this happening? I removed doubles by pressing M -> By Distance.
$\begingroup$ it may be another bone that influences these vertices, or this bone may influence at a very low weight and it will still move these vertices, you could simply select all these vertices, go into the Object Data panel > Vertex Groups, and in the pop-up panel on the right (down arrow) choose Remove from All Groups, or please share your file $\endgroup$– moonbootsJul 11, 2022 at 8:18
$\begingroup$ Here it is drive.google.com/file/d/1EJZt8jV9Zi-h2e1ACN1yEGpJSF2_jRBc/… $\endgroup$– Amazing UserJul 11, 2022 at 8:28
Blender is doing his best to assign the vertices to the most logical vertex group, there is no leg bones for the moment so the bottom part is assigned to the spine group as you can see here:
You should create the leg bones, it should make it work better (it will still need some corrections though):