It's at the glDrawArrays
call that currently enabled attributes are read and passed to the renderer. If you disable them before that then they won't get passed from your buffer.
There can be a lot of potential attributes available (up to glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &result);
at least 16) and most applications don't need that many.
The position
attribute in the shader is set to index 0
and if it doesn't get assigned then the shader gets all points with the same location (typically 0,0,0,1). Whereas index 1 is the color data and if that is missing it's not a big deal.