Maybe it's what you (we) don't know that matters here: The location of the shelf in relationship to the studs.
Don't know if this ASCII art will work. The S's are studs.
Center the shelf and stud mounted brackets look fine.
_______________ S S
Shift the shelf to left and things start to look a bit funny.
_______________ S S