This is the chicken and egg problem. Too many of the people who would make very good cops do not wish to become cops because of the racist and abusive people on the force. I wouldn't be at all shocked if there's also a factor of the job itself grinding down it's workers and leading some to become racist and abusive as well
From what I understand, when people that are good become cops and try to hold fellow cops to the same standards, they end up getting hung out to dry and forced out.
Check this case out: https://archive.is/2jzIx, and then consider that this kind of thing is only slightly extreme.
Cops that stay in enable the shitty cops or become shitty themselves, good cops get forced out. The entire system is rotten, and needs to be entirely reformed. I think that it probably needs to be handled in a way similar to the way that Reagan handled striking air traffic controllers: fire every single cop, use National Guard MPs on a temporary basis while entirely new cops are recruited and trained, and have iron-clad oversight and standards established before the new cops take their positions.