The pages have different URLs, therefore they are different pages – eg, the URL for the desktop page is www.example.com/page1 and the URL for the mobile page is m.example.com/page1. Where Google sees two different URLs, it assumes you have two different pages unless you tell it otherwise ... and the mobile page probably has a much higher content:noise ratio, faster download times etc, meaning that it thinks the mobile page is a better bet (there's a lesson in there somewhere). You may think it's the same page, it may even be created from the same entry in the database, but when it shows up with a different URL, it's a different page.
That's why you put the
alternate link on the 'real' page, to flag up that the other page is just the mobile version of it, and the
canonical link on the 'mobile' page, to direct search bots back to the main page for non-mobile users.