When anonymous users shop and then log into the site at the first page of checkout, then the cart contents must change from the anonymous user to the logged in user. If you want the cart to automatically move the contents then you will need to modify the rule within the Settings > Site Wide Settings > Log In & My Account > Auto-Merge Computer Cart with Customer Cart Upon Log In, which controls this functionality.