To aviod propagation of changes. A tiny change in the code can propagate all through the code. But a change in a private member variable can mostly result only to change in that class and not the entire application.
Encapusulation is used just to bind together object properties .. its help us store eveything related to a class together and provide action to use them. this has nothing to do with memory optimization
Encapsulation is an OOP principle of placing the data and functionality within a single entity. This is so that all the functions that access the internal representation of the data type must be part of the data type definition.
Encpasulation is the process of packaging the classes into the public interfaces and private implementation so that any changes in the code will not effect the implmentation. The interfaces should be designed such that the actual implementation would not affected by any changes in the code. Encapsulation dictates that one class must not have access to the private data of another class.