Both will play a role, and it will differ between societies.
Boys from more intellectually inclined backgrounds will have the role models outside school and that correlates with class (as do attitudes to authority, of course).