What happens if you name the method Compare?
I think the behavior has something to do with the way the AFElements type of the Elements property of an AFElement works internally. I do not know if it allows you to sort that collection. I am assuming it does not.
You should be able to make a copy, and sort that.
var res = Station.Elements.ToList();
I would suggest something else, because it does not seem you need a custom comparer, you could use orderby when dealing with integers.
var res = Station.Elements.OrderBy(a => Convert.ToInt32(a.Attributes["ordinal"].GetValue().Value));
var res = Station.Elements.OrderByDescending(a => Convert.ToInt32(a.Attributes["ordinal"].GetValue().Value));
One a second note: does that code even compile? It seems you are not implementing IComparer<T> correctly. You should implement the Compare(T,T) method, but instead you are using a custom method to do the comparison. Your compiler should complain about an unimplemented method for the IComparer<T> interface.
Retrieving data ...