The Undo system needs to track what was modified in order to do it’s job and undo the changes. It’s structured by Unity to do this by recording the object which is making the changes.
In terms of the Getters and Setters and the fields becoming private instead of public, this is a core pillar of OOP design. Leaving a field public (specifically, leaving the ability to change the field public) can expose your class to unwanted (and sometimes difficult to debug) changes from other classes. By restricting the ability to modify a property to a setter, we can get the opportunity to validate changes, and in the case of our Editor code, to set up the Undo system.