What's the idea behind this, assuming it is ideal?
Because it's an output stage, it won't make sense without a load. Try looking at it with a 100 ohm resistor from V_out to ground. 

When Vin is 0, Vout will also be zero, but there will be a (hopefully small) amount of current flowing through Q1 and Q2.

Now let Vin jump to 1 volt. The anode of D1 will be at about 1.6 volts, and the output at about 1 volt. The cathode of D2 will be at about 0.4 volts, and the emitter-base of Q2 will be reverse biased, so no current will flow through it.

Likewise, if Vin equals -1.0, the output will be pulled down to -1, and Q1 will be cut off.

The advantage of putting the diodes in, rather than just tying the two bases together, is that the output will respond smoothly to Vin variations of less than +/- .6 volts. This is critically important in avoiding crossover distortion when the output moves through zero.

EDIT - Although I realize that this still doesn't explain why one transistor conducts but the other doesn't. Think of it this way. With an appreciable load, the emitter current of the transistor which supplies the load current at the specified polarity is greater than the draw with zero Vin. This means that the emitter/base voltage is greater, too. In turn, this reduces the base/emitter voltage at the other transistor. Since base currents are exponential wrt base voltage, this reduction in base voltage causes a major reduction in emitter current. Thus, only the transistor supplying load current conducts much, and in the process starves the one not conducting.