WHY is the equation done like this?

Example: 4d-4=5d-8

The first thing you're suppose to do is subtract 5d from both sides, but why 5d instead of 4d? Why do we know to do 5d?

The equation is done this way because it is the most efficient way to solve the equation. By subtracting 5d from both sides, you are able to eliminate the d variable from the equation, leaving only the constants 4 and 8. This makes it easier to solve the equation, as you can then subtract 4 from both sides to get the answer.

subtracting 4d will also work

4d-4=5d-8
-4 = d-8

but most people like to have the variable on the left. Doesn't really matter.