The origin of principal axes of rocket comes from the corresponding axes and motion in an aircraft.
All three Axes
The Pitch axis pass through the center of gravity and parallel to the wings.
How to find the principal axes in an rocket?
In rocket, while the roll axis is very simple — an axis passing through the center of gravity and from bottom nozzle to 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 characteristic 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.