Explaining the need for two transistors in Not Gate
Two transistors are needed if the output must be actively driven both high and low, which is usually the case. If, for instance, only the lower transistor were used, then when the transistor is ON, the output is pulled low, but when it is OFF, the output voltage can be high or low or anywhere in between. As shown, either the output is pulled low (logic 0) or it is pulled high (logic 1). A similar output stage will be used on almost any output, whether it's gates, flip-flops, shift registers, counters or whatever.

As a note, some logic only uses a single transistor, usually connected to ground. When the transistor is a bipolar transistor it is an NPN, and the output is called an open-collector output; for CMOS it's an open-drain output. Generally, this is connected to Vcc by means of a resistor, which provides pullup when the output is a logic high. Examples are the TTL 7406/74LS06, or the CMOS 74HC06.