Why must we use mode locked lasers? Quick question:
If I have a laser cavity with a bunch of harmonics under the gain curve:

Why do I not always get a pulsed laser? EG:

I mean since these harmonics exist in the cavity arn't they always in phase because the ends are closed and they create standing waves in phase to each other? Where does the out of phase aspect come from ? Mirror imperfections -> implying the length of the cavity is not constant? I mean I am wondering, why not all lasers are pulsed, since there is always going to be more than one frequency under the gain curve to some degree. 
Thanks!
 A: There are many kinds of lasers, and mode locking is a technique that is required for most pulsed lasers. Mode locking is used to control the structure and number of pulses present in the laser cavity; usually it is required that only one active pulse be present in the laser cavity, and it endlessly recycles, releasing an external pulse each time it arrives at the external coupling mirror.
The cavity length establishes the time it takes for a pulse to make a round-trip, which determines the repetition rate for the pulses.  Proper design of the gain medium, the cavity size, the mirrors, and the saturable absorber can provide passively mode-locked and stable ultrafast laser.
The length of the cavity alone is insufficient for mode locking, and not all lasers require mode locking. 
A: I think you are asking if the various harmonics in a laser cavity are in phase with each other, and if not then why not.
It's pretty straightforward.  Consider two laser wavelengths in a cavity of length L: one is $\frac {L}{N}$, and the other is $\frac {L}{N+1}$.  Though the two can have the same phase at the ends of the cavity, they usually don't.  
Moreover - and more importantly for Q-switched lasers- the different modes of a laser are typically uncoupled.  That means that even though the frequency relationships between the modes are fixed, their phase relationship is not.  A Q-switch couples the modes basically by allowing them to be amplified only if they are in phase at a specific moment, once per round trip cycle in the cavity.
