This technique will also preserve the order of your menu items. Whereas if you’d just floated some menu items to the right, the order of the right aligned items (if there were more than one) would now be wrong.
Of course, this technique doesn’t just apply to menus but it seems to be the most common case I find for it out in the wild.
See the Pen Right and left aligned menu items in a single container by Nick (@nickdavis) on CodePen.0
Update (25 Mar 2017): Alain Schlesser (rightly) points out that this needs formatting for mobile. I should clarify that the above is only a proof of concept for a desktop view and I would re-format the layout for smaller screens (e.g. all centred, in a dropdown menu perhaps).
In fact one of the bonuses of doing things this way is that you haven’t to create two different menus or extra containers within the menu to format things. So when it comes to mobile formatting you’ll hopefully have an easier time.