Because Zn(OH)2 can either release the OH--ions and form Zn2+(aq) + OH-(aq), or take OH- from the solution forming a complex: Zn[(OH)4]2-
In acids, it will react following the first hence increasing the pH, in bases it will follow the 2nd, hence lowering the pH
NaOH will not form complexes, so can only react as a base.