Modern lenses are not "true zooms." Almost all recent lenses marked "zoom" are not actually zoom (parfocal) lenses at all, but varifocal lenses.
Simply put, you must refocus every time you change the focal length of these lenses.
Okay, I feel another question coming...here it comes...yes, I can feel it...: so why did the lens makers stop making true zoom lenses? It has to do with optical designs and autofocus performance, mostly. By allowing the focus elements to operate separately from the zoom elements, you can put less mass into the focus system, which has performance impacts. This also opened up some new optical designs, resulting in better, faster, or smaller lenses (all else equal).
Ironically, the push towards adding video to still cameras has probably got the lens designers all in a tizzy, because videographers prefer focus to stay put as they zoom. Oops. You may have seen some lenses labeled with something like "optimized for video." Yep, true parfocal zoom is usually one of the "optimizations." Funny how things go full circle sometimes.