Oh, yeah, they took all sorts of liberties with those types of shows back in the day. Same with detective shows. I knew lawyers who'd just go crazy and hated them because the detectives were doing things that were illegal or would get the evidence thrown out or made any number of errors that would lead to an issue at trial if it ever got to trial. Which is why Law and Order was such an innovation.
Still, as a kid, those shows were something else. AND they addressed social issues...gangs, racism, drugs, etc. It wasn't gritty, but they entertained and touched on issues...and not just without, but from within (as in, I think I recall an episode where one of the older cops was rousting black kids for no reason and Martin Milner stood up to him. That REALLY resonates in LA because of the history of the LAPD and Chief Parker and later Chief Gates)
They were both good shows. Just really, really good shows.