This is caused by the Animation window's automatic easing curves. At the bottom of the animation window there are two tabs, "Dopesheet" and "Curves". In the "Curves" tab you can view or edit the smoothing/easing curves. Switch from bezier to linear if you don't want this type of side effect to occur when you edit a keyframe.