Thank you for URI to launchpad. I understand what happened when file(1) is used internally.
Generally, magic numbers of file types are not always designed to be used for telling the file type from others, so magic database cannot be perfect. I will not stick to file(1), but I realize it's essentially bad idea to use magic number to distinguish file type automatically unless it was designed to do so. How to create confusing file: $ echo BZh is the magic number of bzip2 file. >bz2.txt $ file bz2.txt bz2.txt: bzip2 compressed data