Why Do We Need Encapsulation Encapsulation allows us to modify the code or A part of the code without having to change any other functions or code . Encapsulation controls how we access data. We can modify the code based on the requirements using encapsulation.