It keeps raw fields from being mutated arbitrarily and lets the class enforce simple business rules.
In early object models, encapsulation gives each class a clear boundary around its state. A Product can reject invalid prices or hide how a value is stored instead of letting every caller edit fields directly. That keeps the model easier to reason about before the design becomes more advanced.
Additional Notes
How does encapsulation improve a basic product model?