Move rig bone in edit mode bugged video about rigging issue

Why does this happen? I'm only moving the bone on the z axis but it moves to the side also.
Ok i figured it out myself, had snapping to closest face enabled.