The origin of the principal axes of the rocket comes from the corresponding axes and motion in an aircraft.
All three Axes
The Pitch axis passes through the center of gravity and is parallel to the wings.
How to find the principal axes in an rocket?
In a rocket, while the roll axis is very simple — an axis passing through the center of gravity and from the bottom nozzle to the top nose, the other two axes are defined as per convention. Since a rocket is basically a cylinder, the yaw and pitch motion can look exactly the same. Hence to define them, we pick some distinguishing characteristics of the design, like a fin placement, or a window location, and place the yaw axis perpendicular to the roll axis and through the center of gravity. And finally, the pitch axis is perpendicular to the yaw and roll axes origin at the center of gravity.