Would you be surprised if I told you that you can be both an 'actual former gang members, police officers, judges, politicians, teachers, etc' and simultaneously a 'professional actor'?
What I mean is that they were hired based on their acting CV and auditions. It turns out that a very small number of mostly minor actors had some run in with the law in their youth, and there is one actor who had been selling drugs decades before. This story got media play when The Wire was on TV and people thought that the producers had gone out and hired actual gang members for the cast. This isn’t true. They went through the usual screen actors guild and casting process. The iconic characters people remember are mostly stage actors, and not from Baltimore (two of the main characters are British).