How so? What prevents that? I don't believe it, but people like saying it without evidence.
It sucked. If the company doesn't shift and completely overhaul its entire culture from the ground up to full remote including junior mentoring, it's difficult to see, especially from the managers and senior perspective who already know everything to get their work done and be productive, how much knowledge I missed out on as a junior.
When I was in the office, I would pass by a coworkers and see some new development environment or tool on their monitor and I would ask them "Hey, sorry, what's that <thing> you use", "Oh yeah, it's a tool for doing X, it's very useful, you should try it.", "Oh neat, thanks". When we switched to remote I would have no way of seeing the tools others use that later help me also be more productive.
Or when two of the most senior colleagues would be discussing some very high level technical stuff together, I would sometimes listen in and learn something new and sometimes ask them questions later about it and even volunteer to work on that if they need help. With the switch to remote, I have no chance of hearing 1:1 technical discussion calls between the seniors and find out new things or challenges they face.
Basically, I was missing out on a lot of technical development and became this anonymous avatar that needs to takes Jira issues as input and produce Gitlab merge requests as output, pigeonholing myself and stagnating my growth both as an engineer and inside the organization.
I started my carrier as a remote employee before the pandemic. Pairing helped a lot to learn how others are working. Most of the technical discussions where public. Usually on slack or on GitHub (via RFC PRs). If somebody scheduled a meeting usually included the whole team as optional and encouraged juniors to listen even if they can't contribute. We planned our sprints together so everybody know what the team is working on.
On the other hand I joined a new company during the pandemic which had similar issues. I wanted to help solve it, but they didn't even acknowledged it.
Many things in life and in the world shouldn't be the way they are, but the reality in the field is very different and most of the time there's not much we can do about it.
Pairing was never a thing in any company I worked (in Europe).
One was hybrid remote / on-prem with on-prem menotring and sadly they turned up not to meet our standards. I don't think the work arrangement impacted them.
One was fully remote with their mentor fully remote as well and we hired them full-time.
One was fully on-prem as much as they could, with a mentor who was almost fully remote. They were also hired full-time.
So my experience is that there is no correlation between bringing junior developers up to speed and exactly where they work from. Communicating face to face and communicating remotely are different and require different skill sets, but that is down to the abilities of the individual mentors assigned to the individual juniors. Or put another way - every combination works best for some people
Probably the only group made more productive are senior independent engineers.