It's convention only. Kinda like when a M$Word document is named icky.doc. People like to use .pl for perl libraries, which may be required and reused. Naming a script cool.cgi makes it easy to identify cgi scripts, and allows security conscious system administrators to take proper precautions since they can be world executable.