Most music is under a copyright that explicitely prevents public diffusion without a license. Unless the music doesn't have such a limitation, or the police have a license, yes, playing music in a public fashion like that is most probably illegal
There are definitely cases where playing music violates the license, but I wouldn't call it illegal[1]. Playing music at some business almost certainly is not allowed by default, you'd probably need to get a permission from someone authorized to give you one (i.e. a different license). Playing music in public likely has similar rules.