My understanding is that OS X reads files based on the file's metadata and not the extension. It'll look at the first few bytes or so of the file to determine what kind of file it is...
...that's probably overly simplistic because I'm not 100% confident in that answer, but I know it's something along those lines.
Anyone care to clarify?