I can't speak for the "Arduino Projects Book" as such, whichever this is, but the Arduino site "tutorials" are notorious for subtle "skill tests" - obvious and not-so-obvious blunders which cause varying degrees of malfunction and which puzzle beginners when they encounter these.
The "range" of values that can be represented in 10 bits is 1023 minus zero - there are only 1023 steps; the last "step" in a counter would be back to zero. Zero must represent zero and 1023 must represent full-scale, so the steps are not one 1024th of 5V, but one 1023rd, and you therefore must divide by 1023.
Float is used because people assume you need floating point mathematics to perform a division. You don't. If you convert the int to a long in the process of multiplying it by not 5, but 5000 and divide that by 1023, the result is the voltage expressed in millivolts whcih you can print as volts simply by inserting a decimal. Of course, if you do not want to print it, you do not need to either multiply it by 5 or divide by 1023 in the first place, you simply use or compare the value according to your desired calibration.