Your question can be interpreted in two ways.
"Why are we binding textures to the context, and not to the shader?"
Because it would make it unnecessarily difficult to have multiple shaders using the same textures. Note that virtually no graphics API directly attaches a texture to the program. Not D3D of any version, not Metal, not even Vulkan.
Textures are resources used by shaders. But they are not part of the shader.
" , ?"
OpenGL : UBOs, SSBOs, . .
- , . , , . , , , .
( AMD GCN , UBO ). .
, . , . API, Vulkan. , , , , .
, .