How often do publishers change/tweak articles to achieve visually appealing results?
Since some journals provided me not only the final typesetted result but also additional documents that captured the editing (for example a scanned document with the remarks or the copy editor or even a diff of the "source code" (actually a mix of text and source code for the formula)) I can say, based on this sample size of about a dozen: Always.

To be more precise: The text has been changed always, but I can't really tell if this was for better visual appearance or because of the text. Also the figures have been shifted  around in all cases (and I guess that this was for the visual appearance). I can't say whether the journal tweaked their template (because I don't care too much about the templates in the first place).

Maybe I should add that I have been more or less always pleased with the editing. In most cases I did not notice the changes from the typesetted version, but only after a closer look at the diff. At a few places the editing introduce a wrong wording (most cases there was a note to check this passage) and in some cases the typesetting of the formula was worse.