.pyc files are byte compiled versions of the original .py file. When a .py file is executed by python, it first checks to see if there is a .pyc file with the same name and that the original .py file hasn't been modified since the .pyc file was created. It both of these are true then it executes the .pyc file because it can save the step of byte compiling the .py file thus making the execution time faster. So the .pyc file really is executable just like you discovered.

Just because a file is marked executable does not mean that the OS knows how to execute it. What happened here is that the .pyc file inherited some of the permissions (or assumed default filesystem permissions, for example, if you're on a FAT32 drive in Linux).

In general, you don't execute .pyc files. Python stores them so it doesn't have to recompile the code every time it is imported.