My understanding of what B.B was doing and why is that she was implicitly sick of 'playing hero' as Fujimaru's Servant in Chaldea, possibly as an outgrowth of her own feeling about her A.I status meant to look after humanity despite having the not most positive feeling towards the species.
B.B came along for the Sauron Singularity because she was interested in seeing face to face the original person she was modeled after. Only she quickly came to the conclusion original flavour Sakura was boring and so decided now was the time to break bad, she dissolved her contract with Fujimaru so the Chaldea Master couldn't stop her - cut off In Singularity communication with Chaldea so Fujimaru can't end the fun little Grail War romp B.B was planning via reinforcements and established an alternative contract with Rin so she could flex her powers when needed.
She posed as just an AI assistant taking advantage of Rin's disconnect from modern technology, the fact that time travelling A.I Servant is an outside context problem Rin understandably didn't think she needed to be on the look out for and her own Servant powers to create a Contract without Rin's awareness.
Because Erien is drawing from the original Fate Extra characterisation of B.B ie deeply malicious to everyone not Hakuno and has loathes Rin as a core personality trait this contract resulted in not nice things for Rin.
Due to mana being unknowingly spent on B.B Rin has less magical power to throw around - is feeling the strain more and Saber was quite likely operating at a handicap - lower level from where she should be when contracted to Rin. This very quickly becomes a problem when Shirou draws Mordred from the Grail, because Mordred's legend is thematically tied up in killing a handicapped Saber and she proves her creditability by taking off Saber's arm in the first clash of the Grail War.
Already shaken by seeing her supposed to be unbeatable trump card Servant maimed, Rin is left further shaken and desperate when Mordred goes for a walk abridged Alucard style and demolishes Toksaka manor looking for a another fight with Saber. So Rin's place of safety, the home she has a lot of memories - emotional investment in is now gone along with a chunk of her resources, amping up desperation and leaving her pride stung.
B.B via projected dreams helps convince Rin that this incident was Shirou gunning for her specifically. And in Rin's Defense, X person's Servant attacking her home when a Grail War is on meaning X person is trying to take her out of the War isn't a huge jump. Hell given the Ayako stabbing incident Mordred very easily could have killed Rin in the crossfire and that would have been on Shirou for not controlling his berserk Servant.
With a nice emotional stew to work with and insider information about how badly this is likely to go B.B suggested to Rin's subconscious going to the Church for sanctuary. She didn't mind control Rin into doing this, she didn't need to.
Kirei being Kirei offered Rin a devils bargain of turbo charge Saber via Grail Mud bath, it's spelled out that Rin knew this was bad news and a horrible thing to do but her pride, drive to win the Grail War she had spent her life psyching herself up fight, and desire to hit back at her enemies all overrode her sense of ethics and she accepted this bargain of her own free will.
Rin unleashes Saber Alter on Shirou and co, only for an innocent bystander to be killed in the crossfire and Shirou his trauma triggered by this starts seriously considering killing Rin in response.
In Rin's favour she didn't set out to kill bystanders and was horrified by what happened in the aftermath. On the flip side Rin despite being confronted by the reality that Saber Alter was a bloodthirsty monster and that an innocent person was dead as a result of Rin's choices didn't do anything to stop this mess. She felt bad and cried but she was trying to rationalise this away and didn't Command Seal Saber Alter into killing herself - bow out of the Grail War.
As
@Erien said Rin was dealt a bad hand but she chose to stay at the poker table - keep playing.
B.B decided that that her passion project of torment Rin had now reached it's end game, what with Rin stewing in a pit of regret and justification having by her own choice turned a person she could have in another life loved into a monster and completely burned her bridges with Shirou who is now psyching himself up to killing her if he has to.
B.B decides to prod a Rin - Shirou confrontation into happening so she flex's for the first time in the War and grabs Taiga while leaving Shirou think this was happening on Rin's orders, getting him all angry and primed to knife Rin in the process,
Shirou faces off against Rin, B.B whimsical and egoistical to a fault can't resist taking control of the situation and gloating about how it was her all along, she's been pulling the strings - look at how smart she is etc and now Shirou should kill Rin at her say so in exchange for Taiga.
Que the events of the last chapter.
As for what B.B expects to happen after this, well if the various lostbelt - special events are canon for this stories Chaldea then "one of Fujimaru's Servant's went rogue and started shit inside a Singularity then are forgiven" is a weekly occurrence so B.B thinking she can do this and not get executed might have some grounding in reality.
Alternatively by 'going back' she doesn't mean she's returning to Chaldea proper so much as jumping back to Chaldea then using their technology to reenter her home turf of the Moon Cell.