While I couldn't comment on how they evolved (and I suspect there are many different answers), I'd point out that English has a very complicated pattern for ordinals:
1, ends in 1 except 11, 111...: -st
2, ends in 2 except 12, 112...: -nd
3, ends in 3 except 13, 113...: -rd
everything else: -th
(also 0, most people say zeroth but nobody really feels comfortable with it.)
However they came to be, there's no mental load in applying them and nobody who speaks English natively ever much thinks about it.