Yes there is something controversial here. It is simply not true, that the equality sign has a direction as in an assignment like in programming code, which you seemed to interpret. This is wrong. An equality sign means something else as it does in codes.
The sign "=" means especially:
\begin{align}
\text{reflexivity: }&A = A \\
\text{symmetry: }&A=B \Longrightarrow B=A \\
\text{transitivity: }&A=B \wedge B=C \Longrightarrow A=C
\end{align}
and this holds in physics, too.
If two physical quantities are equal, as in your examples,
then this means:
there is a setup in which those quantities can be considered equal; with all it's implications.
It does not mean, the equality would make sense
in all thinkable setups. The molecules in this room all are in motion and have mass. Thus they have a kinetic energy. But it doesn't make sense to compute this energy by ##\frac{1}{2}mv^2##. Nevertheless, it remains true for a single molecule at a certain time.
So the main difference between code, mathematics and physics are:
- code = stands for an assignment as ##k=k+1##
- math = stands for quantities which are considered equal as ##1=\frac{2}{2}##
- physics = stands for quantities which are considered equal in a certain setup; it simply doesn't apply in other setups.