That's only because the character strings themselvers are different. The string "squeamish ossifrage\n" ends with a newline character, while 'squeamish ossifrage\n' ends with a backslash followed by a letter n. The \n sequence isn't special within single quotes.
Comment on Re^2: squeamish ossifrage - SHA failing