After using the od -a command, I noticed that the line-break characters are different between the bad and good CSV. I changed the line-breaks from \n to \r\n. The file command shows the MIME type as text/csv now! Thank you @endecotp!
Topic:
Programming Languages
SubTopic:
Swift
Tags: