There is no single answer for this question, as there are probably dozens of reasons that they record the mileage after every rental. There are the obvious ones :
- The mileage is recorded on the receipt given at the end of the rental, including details of the distance the car was driven.
- As you've said, some rentals are charged per-mile so they need to know the mileage. Having the staff only collect this information if it's needed adds an extra complexity - plus they will generally use the end mileage from one rental as the start mileage for the next.
Then there are some others :
- Having a good record of the mileage helps them manage their fleet, including knowing when vehicles will need to be taken out of service for regular maintenance, or when they will be removed from the fleet due to age.
- Even for rentals that are not charged based on mileage, most providers will track renters who drive "excessive" miles and may refuse to rent to them in future (especially if they believe the vehicle might be being used for things disallowed by the rental contract such as certain commercial uses)
- If the vehicle is not returned full of fuel, the price for fuel is frequently based on the distance traveled. eg, one of my recent rental agreements states that I will be charged for fuel at a rate of "$0.370 per mile" if I do not refill the car.
- For short rentals (often below 75 miles in the US), many rental companies will ask to see a receipt for fuel to confirm that you have re-filled the car. Obviously in order to do this they need to know the mileage. (This is done as the fuel gauge may still show full for such short rentals, even if it was not refilled)
There are likely many more reasons, but it's fairly clear that there is sufficient reason for them to track these details - and in particular for them to ask you to provide them so that they can minimize the effort required by the staff. If you do not provide the details then the staff will obtain them - but this will generally require them to go to the vehicle to do so. At major return locations like airports this will be a standard part of their workflow, but at small locations it's simply easier to ask the renter to provide the details. In most cases they will check these details at a later stage (eg, when cleaning or re-renting the vehicle) so if you have provided incorrect information it will still be corrected.