Yes, but the origination started with police who had to or were supposed to cross their t's and dot their i's with an arrest and probable cause BEFORE a prosecutor or the "legal side" even gets involved. Once the DA agrees to press charges based on your arrest and evidence, then you do work together to some degree but report to different bosses under different authorities. There's still corruption even with that separation, but imagine what it would be if there was no separation at all.