A web2py controller is not like a Python module. It is meant to be executed in a prepared environment to generate the response to an HTTP request. Because the top level of the controller may include code you wouldn't want executed unless proceeding with an HTTP request, it must first be determined whether the requested function actually exists in the file before executing it (in order to allow execution to be aborted in case the function is not present). Also, when web2py compiles applications, it creates a separate bytecode compiled file for each function in each controller -- in order to do this, it must know the function names, again, without executing the file (as the compilation process takes place outside the environment of an HTTP request, and we don't want any side effects).
Anthony