Why would they work there in the 1st place?
It's a combination of reasons. In Austin, the districts were divided into 7 areas. Adam was wealthy white folk. Edward and Charlie were black and hispanic. When you graduate from the academy you do your riding period in any of them. Your final assignment after probation is not up to you. Once placed, which you had no control over, you could put in for other shifts in other districts. I personally stayed in Edward, Charlie which was the busiest districts because it made the time pass and it met my personal reasons for becoming a cop. Once cops had been around awhile, they typically would migrate to the easier districts, Adam, Baker, David. For me, it was never about the easiest assignments. But everyone had different motivations. I'm of the opinion, if your heart is in the right place, you can navigate the worst neighborhoods and survive.
We would hold quarterly community meetings in the neighborhoods we patrolled. We tried to build relationships with the "leaders" of the communities I policed. We didn't always agree, but it went along way to buidling trust.