Without the resistors on each leg, you would not be able to control the 20mA going through each leg as the resistors are sized to created that current. Also, without the resistors, all your diodes would be tied to the same positive voltage and ground, in turn fighting to output different...