The power adapter serves the purpose of converting AC voltage to a single DC voltage for your computer. It operates as an external battery for your computer so that the computer’s size does not need to be so large.
A computer uses many different DC voltages. One is provided by the power adapter and the other is provided by internal circuits in the computer itself. These combined give the computer what it needs. The power adapter serves as the battery that is providing specific energy and volts to a specific computer it is plugged into.