This also works for formats like Python, HTML, and JSON.
That's not the point in file type guessing is it? Google employs it as an additional security measure for user submitted content which absolutely makes sense given what malware devs do with file types.
Knowing is better than guessing.