electromagnets weigh less, therefore lighter motor and/or generator.
permanent magnets have magnetic properties all the time, so it will be in a magnetic field and will be interacting with other metals even when theres no current cutting through it.
thus, electromagnets are better because they act only when the motor is being used.