Why are we allowed to make algebraic calculation on units Is there math proof that we can cancel out units in Physics? For example:
$\require{cancel}distance = \frac{meters}{\cancel{second}} * \cancel{second}$.
So we see that seconds cancel out and we left with meters which is correct but how is it possible if it is not actually division (meters per second) it is only our interpretation of speed. Why are we allowed to make algebraic calculations on units? Also, we can use dimensional analysis to check that we do everything correctly but why? Why does it always work?
 A: Good question. I don't have any elegant, deep mathematical answer for you. But let's consider an object moving at 3 m/sec and consider a time interval of 5 sec. We can lay out the object's progress along a line consisting of 5 sections, in each of which the object has moved 3 m. So the total distance moved is 3m + 3m +3m +3m +3m = 15m. Knowing multiplication, we can also find the total distance as 3m x 5 = 15m. Notice that in this last calculation time doesn't play a role. I'm simply multiplying a distance by a pure number. So (3 m/sec) x (5 sec) is really 3m x 5. The seconds cancel. That to me would justify treating the sec unit like a number to be canceled.
A: The question seems trivial, but it isn't at all!
Some strange formal properties of algebraic calculations on units
(e.g. the elusive rad unit which appears or disappears)
should suggest that "something is wrong" instead of the
more usual W.Allen's "Whatever works".
The problem concerns the logic (syntax and semantics) of the ''mathematical'' language of physical quantities.
What does mean "the product of a force times a distance" or "the division of a distance by a time"?
And what is the rigorous logic of the dimensional algebra?
Units of measure are samples of quantities, but the calculations made with symbols of units are a particular form of dimensional calculus.
This (little-shared) statement is not the result of an improvisation:
here I am forced to be self-referential by quoting the document:
http://pangloss.ilbello.com/Fisica/Metrologia/grf.pdf
Unfortunately the text is not in English language.
I emphasize  S.3.7 ''Algebra of units of measure'' and
the last sentences:
The usefulness of dimensional monomials consists in making the calculation of the relationships between the various units of measurement of physical quantities algebrically intuitive, conforming it to the ordinary rules of algebra (as illustrated in the examples).
The ordinary calculations with units of measure are based on dimensional relations between classes of quantities, they are not univocal relations between units of measure. We must not deceive ourselves to be able to obtain in this way the exact conventional name or even the definition of the calculated unit!
A: As Pangloss points out, this is surprisingly non-trivial!
The sort of manipulations you are talking about are part of a quantity calculus.  This is not to be confused with Newton's and Leibniz's Calculus.  A calculus is just a  method for computation.  This is a method of manipulating quantities which yield "the same" quantity with different units.
Your method of "canceling" the units is the normal way of phrasing one of the rules that can be applied in quantity calculus.  And, we show very informally that it works, because nobody has found a way it doesn't work.  It's anthropocentric, but its the truth.  Like so many systems, we can do the things we can do in that system because we evolved countless systems that didn't work, and this one did.
A major aspect of answering your "why" question is the axiomization of unit conversions.  This is the process of "turning the crank" on these unit manipuations to produce all true unit conversions.  In theory, if you could do this, you could start to make statements about how they work and prove something more profound.
As it turns out, we cant do that.  We do not currently believe that units "in general" can be axiomized in this way.  However, we are confident that the basic scientific units (meters, seconds, etc.) can be treated this way.  Perhaps they are a special case, perhaps they are a general rule.
Metrologia keeps their papers behind a paywall, but a particularly interesting paper might be On quantity calculus and units of measurement.  This discusses an interesting pattern where our basic scientific units can be treated as quantities in their own right (i.e. "ft" corresponds to "1 ft"), and thus admit algebraic operations like division.  However, it points out that, in general, this is not a valid construction.
A: The rules of algebra apply to the manipulation of symbols.  The expressions for the units of measure are symbols.
