@DifferentiationWell, the thing with Minecraft is that it was developed over several years by programmers who were not really professional programmers. That is actually part of its charm. However, from programming practice point of view they do a lot of "bad habits" -- in this case there is a lack of "encapsulation".
Your question highlights the problem with lack of encapsulation. Basically, the scope of fields and availability of setter and getter functions is very inconsistent. "Properly" speaking, motionX, Y and Z and other fields shouldn't be publicly accessible. Rather there should be setters and arguably probably just vector type ones. It is a lot "safer" to have setters because then you can add data validation, and also it allows control over if and when changes can be made.
You'll often find weird code in the Minecraft source that is due to lack of encapsulation. In particular you'll see all sorts of data validation sprinkled around.
You'll also find other things like methods and fields that have essentially been abandoned -- not used in any meaningful way.
Anyway, it is just part of the charm of modding. However, I do have one warning -- when calling vanilla methods or accessing vanilla fields always check carefully how they are used in the rest of the Minecraft code. You'll frequently find that a method that you think does something doesn't really do what you think, and you'll also get ideas about what sort of data validation might be needed when you use the method.