Companies pay tax on profits.
Mileage is an expense so it is deducted before profits are calculated.
For example, a company can that just has reps on the road may find that mileage accounts for 15% of their turnover. If profits were 10% it would be a bit mad to pay tax on the 15%, yes?