Thanks. I’ll look into it soon.
Security is part of it, yes, but it is also because game logic and actions are not synchronous. So if you order a unit to move and attack it instantly reduces the current health of the target, but this is first displayed to the clients when both actions have played out (quite a bit later). If you were to use these variables for HUD etc., they would show information to the players that is out of sync. You could use separate variables on the unit for DisplayedHealth which is used for the HUD, but these should still not be replicated, since if there are connection issues one client might see the result of an action later than another, causing similar confusion. A great benefit of the action system is that even if there are such connection issues, animations etc. will always look smooth without any visible lag or choppiness, as there is no continuous updating from server to client.