Maybe to _you_, don’t assume other people are the same way.
Along my whole career path (I’m a senior now) I’ve always been curious about the high-level technical stuff and took every opportunity to listen to knowledgeable people.
I think there’s a term for it: incidental knowledge transfer.
You might be stripping that person of the opportunity to grow, or maybe just to hear about something interesting for them to follow up on later.
As for "incidental knowledge transfer" as you call it, there's another side of it: it's called distraction.
If you're a senior, you should have been a junior at some point, so I'd put the question back to you. Do you feel like sitting next to two people speaking in a completely different language would eliminate distraction? For me, I'd still be getting the noise of you speaking, but then I'd also be wondering why two members of my team have openly excluded me from a conversation happening in my presence. It doesn't encourage me to try and do better, and it makes your duties opaque. The way you describe it also sounds rather imbued with infantilism; "don't worry what we're chatting about, just type your little code while we do important grown up stuff".
Would you have been open to her asking you to stop if she felt that was ruining her productivity? It really just seems like a barrier that isn't necessary and shouldn't be there, waving it away as though they should have different feelings about it.
Most definitely yes. But she never really shared with us what she felt. So when I heard from my boss she wasn't OK with us talking Russian I was like: WTF, how doesn't she understand she has a privilege to speak her native language at the office while most of the employees have to resort to the silly form of English they learnt at school?