Throughout the series, we've seen that Yakou has a strong liking towards Baku. In particular, during the earlier gambles where Yakou refereed, he would frequently assist Baku as long as it was within the rules. Examples being:
picking up the wire tap pen (in the abandoned building gamble),
prolonging the ranking battle against Mekama in leader's presence (in the terrorist gamble).
But it's always been a situation where Yakou is doing the act purely out of his own will; Baku never asked him to do any of it. Oddly enough, Baku also never seemed to give any physical or verbal acknowledge towards Yakou's assistance in any way at all.
A big change happens in the car ride before the Empire Tower gamble, where Baku directly called Yakou for a ride to the tower. In the car ride, Yakou ends up getting angry and threatens to kill Baku. And rightfully so, since so far, Baku has been taking Yakou's help for granted in every single gamble,
plus his allies (Kaji/Kyara/Karl) even casually stayed at his cafe to hide from the police from the funeral division, and finally he calls him up to transport him to the venue even though Yakou has no real obligation as a referee to do so.
Baku calling Yakou here makes it seem like he assumed that Yakou will always and continue to help him as an ally, since Yakou has helped him time and time before. But that’s something that Baku went and decided on his own, without any real input or agreement from Yakou. To put it bluntly, it was quite rude and disrespectful of Baku to just assume this.
Although Yakou, out of his respect and admiration for Baku and his gambling ability, wants to help Baku, that alone isn’t enough for him. At the same time, he also wants to be acknowledged and respected by Baku. That's why he got angry at how he was being treated and decided to test Baku with a threat.
The purpose of the threat was to clearly measure how much respect and thought Baku had towards him, because their relationship thus far has been extremely one-sided and ambiguous. If Baku didn’t have anything prepared, Yakou would’ve killed him, because at that moment Yakou would have lost his respect for Baku for not being able to anticipate the result of his own actions.
“Don’t tell me… you simply took me as a kind grandpa who brews delicious coffee.” - Yakou
Baku answers by using the grenades to show that he does indeed respect Yakou as a person, and anticipated and understood his uneasy thoughts. He even goes the extra mile to (pretend to) risk his life, so that he could establish a relationship as equals or allies, so that he could finally for the first time, make a proper request to Yakou (to take the No.0 spot).
But why did Baku choose this timing to clearly ally with Yakou? Why wait – why not do it earlier? And why did he purposefully provoke Yakou? It doesn’t become clear until we learn that the #0 referee is coming to the Tower gamble, and that Yakou now must execute on his freshly made promise to Baku.
To put it simply, the most likely reason is morale. Yakou’s resolve to aid Baku is at its peak, now that he has just been acknowledged, accepted as an ally, and assigned an important request to become #0. I imagine that all of Yakou’s pent up anger (which was orchestrated by Baku) was also rebounded into further resolve for Yakou, after Baku answered it with his grenade gamble. In other words, Baku has been intentionally keeping their relation ambiguous, manipulating Yakou’s thoughts all this time, in order to save the tension and morale for the most crucial moment, the #0 ranking battle.
The final move Baku plays is the lip bite, which of course he uses at a critical time during the ranking battle,
when he sees that Yakou is about to lose. This is a really devilish move by Baku, since it’s fundamentally different from the lip bite he did for Kyara. The lip bite for Kyara was more of a non-verbal apology since Kyara willingly took on unreasonable pain for Baku. But the lip bite for Yakou was purely to motivate Yakou, by forcing him to remember the peroxide gamble, and Baku’s relation with Kyara. I believe that Yakou was somewhat envious of their relation, especially the respect that Baku showed towards Kyara’s help (of which Baku never showed Yakou until recently!).
Interestingly, Yakou also helped out Baku during that gamble by ignoring the peroxide hitting Kyara even though he noticed it. That moment probably helped Baku understand Yakou’s thoughts and feelings towards himself. And as a result of that, many years later when Yakou became his exclusive referee, he would use that as a basis to manipulate Yakou’s thoughts so that he would be able to take on the ranking battle in his strongest mental state.
It’s to be expected of Baku, as he always makes use of any resource and opportunity to win. Even if it’s the ranking battle, which normally isn’t a gamble that a 3rd party should be able to influence, he tried to maximize his chances by even manipulating his own exclusive referee. But that’s one of Baku’s charms, and why Yakou and many other characters are captivated by him in the first place.