Not a random plane. It is drawn in a plane parallel to the construction plane of the active viewport. The default Perspective viewport construction plane is aligned with the World XY axis.

Only planar curves have an associated “curve plane”. Non-planar curves do not have an associated “curve plane”.

A perpendicular line can only be drawn in the construction plane if the construction plane is normal to the curve. If the construction plane is not normal to the curve a perpendicular line can be drawn in a plane parallel to the construction plane. This is the current behavior.