It is the public scandal that offends; to sin in secret is no sin at all.
The public scandal is what constitutes the offence: sins sinned in secret are no sins at all.