There is OpenGL code available (of sorts). Google for Mesa3D. It is an open-source software version of OpenGL. However, the hardware versions are typically also created by the hardware vendor as a convenience for developers, or provided by the operating system. Seeing the source code of OpenGL really isn't a productive thing; it's complex, rife with hardware specifics and implementation dependencies, and just not a useful learning tool.
Some clarification of a common misunderstanding needs to be added to this. The "open" in OpenGL does not stand for "open source"; it means that it's an open standard. It has a published specification which vendors implement in their drivers (or purely in software in the case of Mesa) but OpenGL itself is not software and it's quite meaningless to speak of source code for OpenGL. One can speak of source code for an OpenGL implementation, such as NVIDIA's, AMD's, Intel's or Mesa, but this source code would be vendor-specific and utterly useless outside of the vendor's own driver.