What is the meaning of [One rotten apple will spoil the whole barrel. or One scabbed sheep mars the whole flock]

“Evil spreads. One attractive bad example may be readily followed by others, eventually ruining a whole community.”, Paczolay, Gyula (1997). “X”. European proverbs, in 55 languages, with equivalents in Arabic, Persian, Sanskrit, Chinese and Japanese. Veszprémi Nyomda. p. 292. ISBN 1-875943-44-7.