Bezier curve control points intermittently do not stay on a plane. WHY?

Some times when I am working with bezier curves and I move the control points at random they will not stay on the axis xy and they go all over the place. The other day I opened up 280 and played with the bezier curve and then move to front orthographic and they handles were all over the place at random. Why only sometimes do my control points remain on the xy axis or any other plain for that matter ? How do I keep my Bezier curves locked on a plane when I Edit them?

strong text

Hi. Try G then Shift Z to lock movement on the Z axis for example. If not axis aligned try setting snapping to faces.

On a side note, if you plan to work with Bezier Curves, this add-on is really useful:

Download link:

thanks for the tips! I still do not understand why sometimes I need to press shit xy to keep it from move around the Z access and other times it does not . Must be some kind of thing that causes to get all wonky.