Years ago, a measurement of, e.g., 25" was the length of the seat tube measured from the middle of the bottom bracket (i.e., from where the cranks go to where the seatpost goes).
The current way of doing things is to measure vertically from the middle of the bottom bracket. For bikes that have a horizontal top tube, you'd measure to the top of the tube. However, for bikes with a down-sloping top tube, the measurement is from where the tube would be if it were horizontal.
It probably was Giant that started using S-M-L-XL to measure frames--beginning I think with their mtb frames--and, associating these measures with a range of sizes, e.g., XL about equal to 59c to 63c, etc.