The thing is, contrary to the Scrum notion that everyone on a team is working on the same thing, the most effective development team that I have ever set up had something like 14 people. The team had such high performance that they became "rock stars" in the company. Here is a writeup: https://scaledmarkets.blogspot.com/2017/01/inserting-devops-into-not-very-agile.html
It is true that people maintain an ongoing cognitive collaboration with only a few people at a time. But programming is not always about ongoing cognitive collaboration. Sometimes programmers need others to focus on supporting areas - e.g. defining end-to-end test scenarios, writing automated tests, thinking about the deployment architecture and automation, and so on.