There are two main reasons for which developers may be bad.
They may lack intrinsic motivation, the fire that lives inside good developers and that only them know how to stoke up when it grows weak. You can't set that fire.
They may have worked in dysfunctional environments that snuffed out their motivation. They may have developed flawed habits presented to them as virtuous. You may still be able to repair the damage, provided there still is intrinsic motivation in them, that the fire is not completely extinguished.