Does it happen on all kind of files, or just txt files?
Usually, it comes from the fact that Unix (from which OS X closely derives) and Windows don't have the same way of "recording" changing lines in txt files: in DOS and Windows, going to the next line, whether manually when typing or because you imported a txt file made by someone else (or another machine) means using a "carriage return" (yeah, I know, sounds old), where Unix uses a "line feed".
A carriage return will first send the carret back to the beginning of the last line you typed in, before switching to the next line so you can resume typing, whereas a line feed will jump to the next line directly. This leads to some invisible extra characters being typed, and since each digit or key press brings its own byte or octet in the balance, your files might end up being heavier under one platform than they were in another.
The Notepad application in Windows is known for its poor text wrapping (which it makes up for by being a good tool for coding, for the same reason), with the user/writer needing to feed its own carriage returns in the text, when Wordpad is more user-friendly, with better text wrapping, but doesn't show the same flexibility that Notepad has.
The same principle applies to all txt-based files, hence to .log files too. And log files tend to be created by applications for this purpose or that, without you knowing it.