Created attachment 156145 [details] first file to compare comm incorretly report common and different lines: common lines independly reported as present only in file1 and also only in file2
Created attachment 156146 [details] second file to compare
As the comm(1) man page states, the files should be sorted lexicographically. The example files are not. If they are sorted with sort(1), the result is the expected one as far as I can tell.