As you have correctly observed, there is often a discrepancy between the reference style actually used by a journal and the style recommended in the author-instructions. Journal styles might evolve over time based on common usage/application by authors, but the journal guidelines might be managed by a different department that takes care of the website, so the guidelines are not updated on time.
Generally, journals are appreciative if authors point out discrepancies; therefore, whenever you come across such a discrepancy, you can write to that specific journal to point it out and clarify the preferred style, especially when the style completely differs between guidelines and sample papers (for example, APA vs. MLA).
Having said that, many journals, while giving a general recommendation for what style guide to follow, now focus on consistency in references more than anything else. So, for example, they will generally not reject a paper because journal names have been italicized when they should not be, but will not appreciate if there are inconsistencies within the reference list itself (some journal names italicized while others are not). Also most journals and authors now use a reference manager software to format references, so consistency in style is easier to achieve either at the submission or the typesetting stage.