Data in .mdf files are stored as pages with each page occupying 8 KB size. The first page of the .mdf file is referred as the header page containing crucial database information like file signature, size of the file, compatibility, etc. The actual data is stored in the rest of the pages.
In case the header page or other page is not recognized by the SQL Server, the entire .mdf file is not considered as a valid file.