Very small AC to DC convertor
The size difference is due to different approaches.

A large transformer implies AC operation at the mains frequency, stepping the mains voltage down without an intermediate conversion stage.

A small transformer implies a high-frequency switching regulator, where the AC is first rectified and smoothed to DC before being chopped into high-frequency AC and then stepped down and rectified to DC again.

As frequency goes up, transformer size goes down for a given power level, as you need fewer turns to do the job. Don't try using the travel charger transformer at mains frequency - it won't work so well.