Sodom was before the grace of Christ which since the cross has appeared to all men (Titus 2:11). If you read closely, even then, God was not on a sin hunt, he was on a righteousness hunt.
But now
God was in Christ, reconciling the world unto himself, not imputing their trespasses unto them; and has committed unto us the word of reconciliation.
2 Cor 5:19.