If Collins knew who killed his lover, why would he sic Cal on the story?
Could have been a failed attempt at misdirection, same reason a killer calls the cops and blames it on a random stranger.
About the ending. what was the most that the authorities could charge Ben Affleck's character with? The killer was mentally unstable and killed his mistress entirely on his own. They make it act as if Ben Affleck's character was the murderer when his biggest crime was not being entirely honest and being irresponsible enough not predict that his old friend was psychopathic. Being friends with a potential psychopath isn't a crime. At most they charge him with is hiring someone other than a private investigator to spy on his mistress, and withholding evidence in a murder investigation, even then that might be protected "prohibition against self-incrimination". I'm not a lawyer so maybe some could clarify for me. So yeah, at most it's Perjury (I don't recall if Ben Affleck's character ever went to court in the movie so that might not even apply) and maybe Stalking through an intermediary. Matt Damon's character is a Congressman and both those charges seem relatively petty, and would hardly quality for cops to come and arrest him.
If the congressman told the police information that he knew was not true and directed them away from the real killer, that would be obstruction of justice and accessory after the fact.