OK, got it. The reason it’s doing that is because you have bezier interpolation on the keyframes…

…which is fine, except they are in the same position so they are sort of folding in on themselves, creating that weird loop.

To understand what’s happening, select the second keyframe and grab it with the selection tool in the comp window and move it to the right and watch the loop unfold…

You can fix it by breaking the handles and making the inner handles zero length, but if you’re off just a little you’ll get some movement or jittering between the keyframes so the best and the easiest way to fix it is to just make the first keyframe a hold keyframe…


To create a hold keyframe, either right-click and choose “toggle hold keyframe” or ctrl + alt + click the keyframe.
HTH