The British/Imperial inch as we know it today has a long and varied history, stretching back to ancient times, as does the foot. Different countries and empires and ages had different values, which you can read about here, here and here.
The inch is currently “defined” at 2.54 cm “exactly”, but there is no record of them measuring any king’s thumb to get that figure, so I’m guessing other factors convinced them to pick that value.
But as it happens, it is probably a good choice, because there’s a nice relationship between the Royal Cubit and the inch, via the Egyptian digit.
If we take, as I believe was the original case, a cubit as being 1/6 of the circumference of a circle with diameter one metre, then a digit will be one 28th of that.
Then we simply multiply by e/2, where e is the base of the natural logarithm.
That gives us 0.0254 m, or one inch.
We can simplify that down to the following, noting that both 12 and 28 were important numbers to the Egyptians.