You're being very naive. Cops are, for the most part, very dirty. At the end of the day it's just an other job, so when you see an opportunity to make some extra profit you seize it - especially when it's off the back of other crooks. In 99% people's minds, this rationale holds up because what's the harm... you see yourself as a good person, they are the bad guy, even though what you're doing is probably worst.
In the end of the movie, perhaps it's MY naivete that's in play here, but Denzel probably took a liking to Hawke's character because he had that one ounce of good in him left still that he was desperately trying to cling to.