I don't know what I did to create this monstrosity but I used Pencil Tool if that helps. This is all I did in this file. It also exports the same. Adding pressure variance makes it worse, but it's by no means required to cause a defect. Testing the stroke in other programs does not cause an issue...
Document attached: 231201_stroke-odd-behavior.afdesign