Calculating voltage gain for AC analysis
Thing about it for a second: Voltage gain is defined as \$Vout/Vin\$, this can be a constant or can vary over a range of input frequencies. Voltage is produced when some current flows through some resistance (or more generally an Impedance), this is simply Ohms law, i.e \$V = IR\$. In this case if there is only a current and no resistance there is no way to get voltage.

As the output of the transistor is modelled using an ideal current source, it cannot produce any output voltage unless you connect some resistance in parallel with it and apply ohms law. This is the only way to get an expression for \$Vout\$ needed for the voltage gain equation.