Setting class weights in logistic regression helps:
Select an answer to reveal the explanation.
Short Explanation and Infographic
Class weights make minority errors cost more during training.
Full explanation below image
Full Explanation
One tool among many for imbalance.