To maintain control and integrity of the object's state.
Not every field needs a setter because it might compromise the class's invariants or lead to inconsistent states. For example, in a User class, you might not want to allow direct updates to the 'userId' field once set, as it uniquely identifies the user.