The diodes are doing the same job in either position. the diode across the transistor is there specifically to protect the transistor from reverse transients from switching off an inductive load.
No, that's not right. Let me explain in more detail. The diode across the transistor protects it from reverse
transients (collector voltage going negative
with respect to the emitter). When the motor switches off, its inductance produces a positive
transient (collector voltage going large and positive
). A diode across the transistor doesn't do anything to prevent this transient.
If you're expecting both positive and negative transients, you need both diodes.