IMO the way it worked was like this:
When LE first investigated the murder they decided that there was not a break-in in their opinion, therefore it had to be an "inside job"
AK was the only one potentially at home at the time, so in their minds it had to involve AK.
The text AK sent to PL saying "see you soon" was taken literally by LE as meaning that she would meet him shortly, rather than the American meaning (as AK would have definitely meant) which is a form of "goodbye till I see you again".
This formed in their mind the theory that AK met up with PL that night and went over to kill MK, and they set about collecting evidence that would show that.
The problem with the theory is that RS said he was with AK, that had to be resolved.
This they set about by using interrogation to extract a confession. According to Italian law a suspect has to be provided a lawyer and the interview has to be recorded. This would prevent them from using coercion to extract a confession (which is why the law is that way in the first place). However, if they interviewed RS and AK as "witnesses", they would have no such protection and LE could do as they pleased, effectively skirting the law. I suspect that this is standard practice with local LE in Perugia. At the end of the day when the suspect complains, they would say they did everything "by the book" and back each other up so it is the word of the many against the word of the one, since there are no lawyers or recordings to contradict them. Nice little racket they have going there, and it is blatantly obvious that is what is going on.
So, to get statements reinforcing their theory they first extract a statement from RS through intimidation and threats that AK left that night, then they do the same with AK implicating AK and PL. Case solved. Or is it?
But not quite. Firstly, PL has a rock solid alibi, and secondly, forensic evidence points at RG as the killer. So what to do now? The can't go with their original theory that AK left RS and hooked up with RG to go an kill MK, because AK barely knew RG and it would be absurd to suggest that she left her new boyfriend to hook up with a near stranger to go and assault her room mate. So, to get around that they decided to get RS implicated. This is pretty much the ONLY reason he was charged with the crime. Then they come up with all these weird and lurid theories about what happened as motive, for a crime that otherwise would be pointless and for no reason.
This is the how they came up with their theory of events. After that, their evidence gathering has been focussed on supporting that theory, and ignoring or downplaying anything which might not support it. So, if they find something that hints at supporting the theory, it assumes massive importance, but anything that hints against it is irrelevant and incidental.
This is the big problem with their investigation, it is flawed to the core and has no semblance of objectivity whatsoever. The correct method to do an investigation is to collect evidence and let the evidence as a whole define the theory, not the other way around.
Getting on to these "confessions" and "statements". People here seem to believe there is no way an innocent person would say anything like that. Let me tell you that is flat out false. They do all the time. I my younger days I came from a country that had conscription for military service, and I did my time in the military intelligence corp for two years. Interrogators are very skilled at extracting statements from people, sometimes they use the old "hook up to a car battery" method, or more usually they use prolonged exposure to stress, fear, intimidation and verbal abuse, but eventually almost EVERYONE breaks and tells the interrogator something. If you have never experienced that sort of thing in an unregulated environment you don't have a clue what you are talking about.
The problem for the analyst who afterwards has to evaluate that information extracted by the interrogator is that the analyst knows that people will say anything eventually to stop the interrogation, so is it true or just made up? Is the information a diamond or a lump of coal? To figure that out what you do is take the information and look for corroborating information that the interrogator was not aware of. If that corroboration substantially matches the statement you know it is likely true, it doesn't then it is likely false.
Now, in this case the information that came from both RS and AK is clearly false since it fails the corroboration tests. If AK really did kill MK then she would have implicated RG, not PL. PL was implicated because that is what the interrogator WANTED to happened, and it means AK probably knows nothing about what happened. The original prosecutor would have been the equivalent of the analyst in an intelligence gathering organization, but he appears to have completely failed in that function. Actionable intelligence absolutely depends on unbiased critical analysts doing their job properly, or you end up in a huge mess.
Likewise with RG. During his original trial he made no mention of AK even though she was under arrest for the same crime at the time. What would be the point of that? It would have made far more sense to have laid the blame at her feet right from the start, since it was proven he was there. But he only did that much later, apparently as a deal to LE to get his own sentence reduced.
I am sorry folks, but this whole case stinks of unprofessional LE tactics throughout. It is clearly an attempt to railroad a conviction by people who are basically incompetent.