This is not a mistake in the code as the code was written for (and works on) standard Arduinos. The Leonardo is quite different from previous Arduinos. Among other incompatibilities, it does not support SoftSerial on all pins.

But thank you for bringing this to our attention. We will make note of this in the tutorial.