The difference is that while you would have to upload a .php or .js includes separate file to the same directory as your main file, you dont need to do that for a .as file. The .as file only needs to be in the same directory as your .fla file when youre publishing your .swf file; as it publishes and runs the script, it will be included in the final output.
So why is this useful? Sometimes you end up using the exact same code over and over again in a complicated series of ActionScripts; this can actually slow you down and make a tangled mess of your scripts while youre working. If you take the duplicate code and place it in an external file, you can reference that chunk of scripts wherever you need to with a single simplified line.
Lets create an example. To start off, open a new Flash file and create a movie clip symbol on your stage.

