It was probably for your own protection. Some areas of Compton are horrendous. Big time Crip/Blood gang area.
Could be .... I guess my point was that stopping by the police when it appears that you do not belong ... happens both ways.