It's a simple question of motivation. If they're brilliant and they have motivation, then of course they could write great software. They just don't.
Make no mistake, people from schools like Cal Poly SLO (a state school, and my alma mater) who excelled in their CS programs can software engineer circles around most. Why? Because Cal Poly has no research program, three quarters of their faculty come from industry, and their faculty have no job requirements outside of teaching. They literally had us managing five to ten thousand line software projects with teams of students in year two.