The purpose of this circuit is to test NPN and PNP transistors and to identify their pin layouts, ie ECB, EBC.
The transistor type NPN/PNP determines the polarity of the connections. The orientation of the transistor is the pin layout. Beginners can define the pin layout when looking at the top of the transistor with the flat side facing toward them. That’s probably not the official way to classify them but it makes more sense to beginners when placing them in a circuit.