Obviously at this point the series is over and we've learned everything we ever will about the <PERSON> character.
Did they try to get rid of the actress and she somehow managed to sue her way into another season and they didn't came up with a better solution to include her?
No, this was a played storyarc for <PERSON> transitioning from the fourth to fifth season:
I was really thrilled about the hexen beast story line just because <PERSON> had been so consistently good and thoughtful and helpful for so long.
That I thought if anyone’s going to turn and be so bad and so evil and so powerful, it should be her. So, that was really exciting for me. And then I will definitely admit that I had a little bit of mixed feelings when they – the producers called me in March and then said, “This is our idea going to Season 5” because it was hard to say goodbye to <PERSON>. - An Interview With Grimm's <PERSON>
That quote is dated January 2016, and so she is referring to March of 2015 of when the producers told her she would be transitioning into <PERSON> for Season 5.
So what is her function in the narrative?
Is there any background information about the creation (and its reasons) of the <PERSON> character?
From the same interview:
Hadrian’s Wall knew how powerful she was and kidnapped her. You know <PERSON> – shot her with the what we now know are tranquilizer darts and basically broke her down and turned her into like a fighting machine. So keeping that in mind, that’s one thing that the new character’s like going forward.
After her interaction with the "stick" <PERSON> became more like the old <PERSON>, but it was more of removing all the emotional repression she was experiencing.
TVLINE | <PERSON> showing signs of <PERSON> returning: What can you tell me about what’s really going on?
<PERSON> | Well, the feelings have come back.
<PERSON> | The stick opened up part of her. 663
There are unintended consequences to the use of that stick. So, just like everything else.
<PERSON> | There’s part of her that was dead, that she had killed, that they had killed. Suddenly it was awakened. And because she’s a Hexenbiest, it had a super effect. So we’ll have to see what happens with the <PERSON> side of her personality and now having all these feelings, which is going to include a lot of guilt. It’ll be complex. - Grimm Finale Recap Season 5 TVLINE interview
<PERSON> was intended to be a weapon for Hadrian's Wall, and the stick ultimately broke the emotional deadening that they had done to her when they removed <PERSON> and created <PERSON>. 516