It's not supposed to, but usually does.
The basic difference between a "varifocal" lens and a "zoom" is that a zoom stays in focus as the focal length changes. That's typically done by moving different lens elements simultaneously. The problem is that it's (at least normally) done mechanically, so manufacturing tolerances and wear in the lens prevents it from working quite perfectly in most cases.
There have been a few lenses that were poorly designed (at least in this respect) so the changes in focus were consistent, but in most cases it's more about mechanical tolerances, so it's mostly specific to a particular lens, not a design in general.