Are you sure that's what happened?
1. Cops don't work with security guards at a random store if they suspect you of something. Nonetheless I have never seen cops working so hard for just someone's appearance if they aren't called to do work.
2. If what you said is true and it happens every time you go out and its not an appearance/ attire issue, then I really cannot guess what habits do you have when you go out on the streets which attracts cops. Maybe you are under a hoodie, hands in pockets and just stayed inside a CD store for hours?
3. I actually suggest you ask the mates you were chatting with and ask whether they also felt the same when they are with you in that they see cops and security guards more often than when they aren't with you.
This can point out whether your feelings are accurate or not.
One of three answers may happen, either your friends says no they don't see cops even when they are with you or;
yes that is the case or;
no they see cops regardless of your presence.
If they don't see cops at all when they are with you, see number 5.
If they see cops only when they are with you then it may be number 4 or it maybe your habits in number 2.
or if they see cops regardless of your presence then if you friends live in your area, then its a high chance that it is that area the police are trying to keep safe. If your friends don't live with you then they may also live in other areas with higher crime rates or I don't completely disregard the chance of number 5.
4. Or it could just be an area of higher crime rate and therefore more cops around but not necessarily following you?
5. Finally, as I have not seen you, just by the way you describe things, there is a possibility of you developing persecutory delusions. People with this delusion think that something is after them.
If you don't want to rely on friends, go to another area and see if cops are still around you. Then you can minimize your options to your habits or an illness developing.
Then change your attire, dress appropriately and see if they are still after you. Then you can tell if it is an illness.