"first" is an adverb in "He stood first in the class", not an adjective. It may be considered as a way of saying "how" or "where" he stood in the class, not "what kind of" something. If you have learned some principles regarding ordinals as adjectives, those principles won't apply when the ordinal is used as an adverb.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.