In a 3 dimensional rotation, rotating a vector changes all angles unless in special cases when the vector had only one nonzero coordinate. Look for "Euler angles" the manual, there you find how a 3D rotation is defined. vec_rotate has certainly no bug, this is just normal math. I dont know what you want to do but maybe you want a relative rotation and not a absolute? You need ang_add then. Look in the manual for examples.

For your own safety I move this out of the bug forum laugh - people use vec_rotate a thousand times since 10 years all in their projects and would kill you if it suddenly behaved different and all the projects would not work anymore.