This can help if you understand that several programs can use the same shader. If just disconnecting it from the program forced it to be deleted, then things like separate shader objects in OpenGL 4.1 would have been implemented much earlier.
You should also be aware that the link does refer to more or less validation. When the shaders are connected to create the program, the input / output variables are all connected, and the identifiers are assigned to the forms used. When the program starts, it fills each stage of the graphics pipeline with a shader. Thus, all the program does is encapsulate several stages of the shader.
This is much clearer if you examine the specification of the ARB_separate_shader_objects extension, which introduces the concept of program pipeline objects. Instead of having one program with a shader for each stage, you can have one program for each stage. The entire program of the GLSL program has always been a bit dumb, in most other APIs you have separate shaders for each stage, and none of these programs binds non-sense.
Use the analogy with an executable program. GLSL shaders are actual executable files, GLSL programs are powerful job management scripts. Your program is responsible for ensuring that each of your shaders works at its own stage in the pipeline and serves as an interface for passing variables (uniforms) to them.
source share