I would say that rule is made considering voltage drop. So "as close as posible" does not seem defined completly. Voltaage drop can't be more that 5%.
From service to main panel 2%.
From main panel to branch 3%.


Now I am still an apprentice so I might be wrong, that is why I like to ask questions. Forgive me if I am anoying.


“If you don't know where you are going, any road will get you there”.