there are circumstances where you want to know whether requests came via https or http
At least the Apache webserver sets up several CGI environment variables, the most obvious one is HTTPS set to on. It also adds a ton of environment variables starting with SSL_ describing many aspects of the SSL connection. The CGI 1.1 RFC 3875 leaves HTTPS unspecified, but allows the Apache behaviour.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)