The Mexican position on this is perfectly reasonable. Suppose a person in the US illegally, say a visa over-stayer, goes to Canada by trekking across an uncontrolled bit of border, is picked up for being in Canada illegally. Should the US take him back, or should Canada deport him to his country of origin? Obviously the latter, and the US would be perfectly within our rights to refuse him reentry, since he doesn't have a valid visa -- unless the US and Canada have a treaty that obliges them to behave differently than generally applicable principles of international law.. Likewise, Mexico has no obligation to take back anyone deported from the US other than their own citizens -- unless, as one poster suggested they have undertaken to do so by treaty.
One wonders why this is even news...