It has to do with the date of their commission. The British Army briefly used the rank of sub-lieutenant from 1871 to 1877, replacing the ranks of ensign in the infantry and cornet in the cavalry.
In 1877, it was replaced in turn by the rank of second lieutenant.
Just don’t get me started on first & second captains.
The 1st Corporal has got me stumped, I must admit, but the A.S.C. appear the be a law unto themselves. I would suggest contacting the Royal Logistics Corps Museum to see if they can assist with that one.
Corporal and 2nd corporal existed in other Corps in units such as the R.E. and the A.H.C., those were both substantive ranks, whereas a lance corporal was then an appointment. Although that is further confused by having both paid and unpaid lance corporals.
The Royal Artillery muddied the waters further by having corporals and bombardiers, but then the bombardier only had one stripe.
I bet you wished you’d never asked now?