OO came out of SIMULA, a 1960s language for running simulations.
Programmers found themselves modelling the real world in terms of data
structures. The best way to organize these data structures is to use
modules.
A well-designed module provides an opaque data structure to the
world: a program doesn't have to know what the data structure is or
how it works, only that the module provides certain subroutines to
call.
Later you can improve the data-structure and so long as the module
provides the same subroutines, the code doesn't have to be changed.