The effect's name is parfocality, we are speaking of parfocal lenses. Lenses that change their focus when zooming are called varifocal lenses.
Like reducing focus-breathing (change in focus also changes the focal length), parfocality is a premium-feature. Since photographers usually work with autofocus and since photographers tend to not recompose the image while taking a photo, photographers usually wouldn't want to pay the premium fee for these features. Or so I think.
True parfocality (i.e. absolutely no change in focus) cannot be achieved (or only with extreme effort) - it's all about perceived parfocality, as in "it seemingly does not change the focus, therefore it's parfocal".
How to achieve parfocality?
Here's a diagram I stole from PetaPixel's article on this subject which is a screenshot from Vistek's YouTube-video on the subject:
Note that this diagram is only exemplary - not all lenses are built in the same way. Anyhow, as it explains, parfocal lenses usually have an independetly moving focus lens group that varifocal lenses lack - usually to keep costs, weight, and/or lens dimensions (as in
Some relatively cheap lenses (at least compared to the ones from Angénieux) achieve a similar effect with tricks, like the Canon 24-105 f/4L IS USM (I):
"There's a cam inside [...] that is designed to maintain an accurate focus when the lens is zoomed from tele towards wide." (Chuck Westfall, Canon USA)
Also, some lenses with focus-by-wire (like Canon's STM-lenses) might try to hold the focus automatically. For example, when I filmed with a loaned Sony FS700 and its kit-lens (18-200mm f/3.5-6.3), I noticed that when I zoomed in/out slowly, I could see the focus motor working to keep the focus point where it was. However, when zooming in/out more vigorously, the focus point "broke loose" because the motor could not keep up with the rate at which the focus point changed.
Is every video-lens parfocal?
From the my example with the FS700 above, we can also see that not even all lenses that are marketed as TV- and cinema-lenses are parfocal. So if you buy a very cheap zoom-lens that is marketed as "video", it is very unlikely to be a parfocal one (unless it says so).
From my limited experience, a good rule of thumb to determine if a lens is parfocal or not seems to be the existence of an adjustable backfocus - Note that backfocus, in video-terms, does not mean the same as in photography: it refers to the Flange focal distance.
Website XY says that my lens is parfocal, but I find that it is not. Is my lens defective?
Your lens probably is not broken. Absolute parfocality cannot be achieved, but rather, it's all about perceived parfocality.
To understand that, we need to understand the relation between spatial resolution and the perceived "sharpness" of an image.
E.g. in analog days, most people used standard films and never looked at their photos at more than, say, 20x30 cm (8x12"). Even good films are said to have about the same spatial resolution as a 20 MP digital sensor and 20x30 cm isn't what we today are looking at - an EOS 5D MkIII takes photos with a resolution of 5760×3840 px, so on my 1920x1200 px 24" monitor, when I look at a 50% scale of the picture, I have a picture size of more than A2. This means that I can see things that I could not see on my analog print. Now think of a portrait - I mistakenly focussed on the subject's nose instead of their eye. I can clearly see that on 100%, while at 10% scale (~15x10 cm), it will not even bug me any more.
The same happens with parfocality: If the image is so small that I can't distinguish between 5cm in front (or in the back) of the focal plane and the plane itself, the photo seemingly is "in focus" between ± 5cm of the focal plane. Therefore, if the focus changes just as much as the visual tolerance allows, one can say that the lens is parfocal.
With thanks to Jannik Pitt and Michael Clark.
I bought lens XY and it seemingly is parfocal, although everybody seems to disagree. Who is correct?
It's the same as the chapter above: You perceive your lens as parfocal, only now, it is because of depth of field (DOF).
You probably used a very small aperture / a very large aperture number (e.g. f/16) and/or some (ultra-)wide-angle lens (f/16 will not be sufficient for 400mm, for example) and/or you are focussing on something very distant.
If the lens changes its focus at a small enough rate, you cannot perceive that - this is especially true when zooming out, as this will increase the DOF. Technically, it's not parfocal - but you will perceive it as parfocal, which, as I keep writing here, is all that matters.
With thanks to Michael Clark.