Garbage has always needed a way to get from someone's property to its final destination—and the iconic garbage trucks have been evolving right with human technology.
In the 1800s, the preferred method was horse-drawn carts, whose contents also carried human waste in the pre-sewer "night soil" days. But by the 20th century they were replaced by pick-up style trucks which would fill their beds with trash and take it to the dump. While a simple and effective method, it posed a number of problems, including the smell of exposed waste, trash flying out of the back while they drove, and workers having to lift heavy loads into the too-high bed of the truck. To combat the sanitation issues, covered trucks began to roll out in Europe in the 1920s, and the trend came to the U.S. shortly thereafter.
However the problem of lifting the trash up into the vehicles was still an issue, so more mechanical solutions were devised, specifically the external hopper truck.