HSBC Interview Question

What is the role of encapsulation? How does it actually help the code