Actually, Gatsby flipped it around. NYPD Blue is about a detective squad which investigates any crime that requires it within their precinct. So whether there’s a crime scene which needs investigation, or someone comes in asking for help, these detectives will handle the initial investigation. If it’s determined that the crime falls under the purview of one of the specialized squads that doreen mentioned (most often Major Case/Homicide, Organized Crime, Street Gang, Sexual Assault…), then some other detective from that squad will be called in to assist / take charge.
This has happened a few times on Blue, and is usually characterized by some outside detective taking over the workspace of our lovable characters, and Andy calling them some variation of a ‘hump’. The decision to call in one of these specialized detectives is usually a delicate one, because one detective will often be wary of giving up a possible arrest to another. Because these specialized squads deal only with certain kinds of cases, they usually deal with crimes occurring in a larger geographic space than regular detectives, be that across several precincts, or an entire city.
Homicide: Life on the Streets deals with one of these specialized detective squads. They’re often referred to within the show as ‘the elite’ of detectives, which gives you an idea why Andy on NYPD Blue enjoys dissing them. This is a squad, in that they not only belong to a specialized group, but have their own central office space which they work out of (as opposed to the roving Special Case squads portrayed on Blue). Unlike Blue, you rarely see detectives from the other squads on Homicide, because our characters are only called in to deal with their kinds of cases. But some of the characters who joined the cast later in the show’s run (like Falzone, Kellerman and Stivers) were pulled from other detective squads- it’s sort of a status (if not a paycheck) promotion to get moved to Homicide.
As to why different cities do things differently, I think that’s just the prerogative of any operation that falls under the jurisdiction of municipal, and not state or federal law. FBI branches, for instance, I think are basically run the same everywhere in the country.
Precinct = georaphic segment of the city which the police department serves, usually numbered
Squad = specific ‘team’ of detectives dealing with a certain kind of police work (including general detective work)