The float data type is used because it can store decimal numbers, which is important for accurately representing measurements that are not whole numbers. This ensures precision in calculations involving real-world dimensions.