Why is focal length measured in millimeters?
Firstly, distance is used for focal length because it measures the distance between the plane of the lens and the point at which refracted rays meet at a point, when the incident rays were parallel. Below is a simple diagram of a single lens. Note: This is only for convex lenses.
The use of millimetres is simply because it is a scale appropriate for this measurement. i.e. the most extreme lengths don't become numbers that are too large or small for us to comprehend easily. Theoretically any measure of length or distance can be used, but this becomes impractical. For instance a 50mm lens could also be said to be approximately 5.28511705 × 10^-18 light years or 0.0005 Km. Both of those measures are extreme but valid, although not practical.
Why not centimetres? Many lenses have focal lengths that are not whole centimetres, and if possible it is better to represent a number without decimal points, and so mm is a more practical unit. There is almost certainly a historical/traditional reason as well.
Camera lenses work on the same principle as the simple single lens, but include many elements for focusing and telephoto purposes.
Because saying you have a .0002485 furlong lens is a lot more cumbersome than calling the same lens "50 mm".
Focal lengths of common lenses happen to be in the range so that integer mm works well. The numbers don't get rediculously large or small, and 1 mm is less than the accuracy we usually care about, but not overly so. In other words, it's a convenient unit.
Whilst it is used to express the field of view, the focal length of a lens is an actual distance - the distance at which a focussed image is formed from parallel rays. As such any unit of distance could be used - if you look at really old lenses you'll often find it stated in inches. Most of the world has now adopted the metric system so that is what is used (for the sake of standardization, also most lens manufactures are based in Europe or the far east). They could have chosen centimetres or meters but that would have involved using decimal places.
It just happens that the millimetre is just fine enough to specify all common focal lengths as whole numbers.
The other logical way to characterize a lens could be by the FOV angle it produces.
We would not longer require to think in "35mm equivalences", but we'd need change the designation of the lens depending on the size of the frame/sensor it's being used on. So it seems that denoting the focal length (in any unit) is more convenient, as it does not change if a lens is used on a medium format, full frame, apsc of 4:3 body.
And we would also need to agree beforehand if the angle is measured horizontally, vertically or diagonally too. And then if we measure it in degrees or radians!
The point about appropriateness of unit size is well taken, however, just like fonts are measured in points (which are 1/72 of an inch) focal length could well have been measured in some scaling of an inch that gave similarly well behaved numbers. I think that the use of the millimeter came about because a bunch of early tinkering with photography was done in Europe, specifically in France which had just adopted the metric system and so the early technical people went for mm, rather than some fraction of inches. I have no sources for this conjecture, however.